Commit ab535fa9 authored by kylechar's avatar kylechar Committed by Commit Bot

Reland "Enable SkiaCopyOutputScalingPixelTest"

This is a reland of 9a8afe6e. Leave the
test as disabled on Fuchsia since it's not reliable there.

Original change's description:
> Enable SkiaCopyOutputScalingPixelTest
>
> The test should work with SkiaRenderer now.
>
> Bug: 1047217
> Change-Id: Ib467e836cf7abc3a8d00b606d81ed33470929db2
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2050616
> Reviewed-by: Jonathan Backer <backer@chromium.org>
> Commit-Queue: kylechar <kylechar@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#740428}

Bug: 1047217
Change-Id: Ia3bc94c4c8abe4c2cb125b9b448de8fec23d09ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2057104Reviewed-by: default avatarVasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: kylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741460}
parent fe6d5a4f
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "build/build_config.h"
#include "cc/test/pixel_test.h" #include "cc/test/pixel_test.h"
#include "cc/test/pixel_test_utils.h" #include "cc/test/pixel_test_utils.h"
#include "cc/test/render_pass_test_utils.h" #include "cc/test/render_pass_test_utils.h"
...@@ -115,8 +116,6 @@ class CopyOutputScalingPixelTest ...@@ -115,8 +116,6 @@ class CopyOutputScalingPixelTest
cc::AddRenderPassQuad(root_pass, smaller_passes[i]); cc::AddRenderPassQuad(root_pass, smaller_passes[i]);
cc::AddQuad(root_pass, gfx::Rect(viewport_size), root_pass_color); cc::AddQuad(root_pass, gfx::Rect(viewport_size), root_pass_color);
renderer()->DecideRenderPassAllocationsForFrame(list);
// Make a copy request and execute it by drawing a frame. A subset of the // Make a copy request and execute it by drawing a frame. A subset of the
// viewport is requested, to test that scaled offsets are being computed // viewport is requested, to test that scaled offsets are being computed
// correctly as well. // correctly as well.
...@@ -167,6 +166,7 @@ class CopyOutputScalingPixelTest ...@@ -167,6 +166,7 @@ class CopyOutputScalingPixelTest
request->SetScaleRatio(scale_from_, scale_to_); request->SetScaleRatio(scale_from_, scale_to_);
list.back()->copy_requests.push_back(std::move(request)); list.back()->copy_requests.push_back(std::move(request));
renderer()->DecideRenderPassAllocationsForFrame(list);
renderer()->DrawFrame(&list, 1.0f, viewport_size, renderer()->DrawFrame(&list, 1.0f, viewport_size,
gfx::DisplayColorSpaces()); gfx::DisplayColorSpaces());
loop.Run(); loop.Run();
...@@ -300,9 +300,14 @@ TEST_P(GLCopyOutputScalingPixelTest, ScaledCopyOfDrawnFrame) { ...@@ -300,9 +300,14 @@ TEST_P(GLCopyOutputScalingPixelTest, ScaledCopyOfDrawnFrame) {
} }
INSTANTIATE_TEST_SUITE_P(All, GLCopyOutputScalingPixelTest, kParameters); INSTANTIATE_TEST_SUITE_P(All, GLCopyOutputScalingPixelTest, kParameters);
// TODO(crbug.com/939442): Enable this test for SkiaRenderer. #if defined(OS_FUCHSIA)
// TODO(crbug.com/1052351): Enable after flake is fixed.
#define MAYBE_ScaledCopyOfDrawnFrame DISABLED_ScaledCopyOfDrawnFrame
#else
#define MAYBE_ScaledCopyOfDrawnFrame ScaledCopyOfDrawnFrame
#endif
using SkiaCopyOutputScalingPixelTest = CopyOutputScalingPixelTest<SkiaRenderer>; using SkiaCopyOutputScalingPixelTest = CopyOutputScalingPixelTest<SkiaRenderer>;
TEST_P(SkiaCopyOutputScalingPixelTest, DISABLED_ScaledCopyOfDrawnFrame) { TEST_P(SkiaCopyOutputScalingPixelTest, MAYBE_ScaledCopyOfDrawnFrame) {
RunTest(); RunTest();
} }
INSTANTIATE_TEST_SUITE_P(All, SkiaCopyOutputScalingPixelTest, kParameters); INSTANTIATE_TEST_SUITE_P(All, SkiaCopyOutputScalingPixelTest, kParameters);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment