Commit 3e8322c6 authored by Sadrul Habib Chowdhury's avatar Sadrul Habib Chowdhury Committed by Commit Bot

viz: Fix a small error in a test.

Use the size from the Quad, instead of always hardcoding to 5x5.

Bug: none
Change-Id: Ic6c552f3a780da002c194918226cc8b3a32c8ab3
Reviewed-on: https://chromium-review.googlesource.com/c/1314142Reviewed-by: default avatarkylechar <kylechar@chromium.org>
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604959}
parent dd8ef1cc
...@@ -211,7 +211,7 @@ class SurfaceAggregatorTest : public testing::Test, public DisplayTimeSource { ...@@ -211,7 +211,7 @@ class SurfaceAggregatorTest : public testing::Test, public DisplayTimeSource {
std::vector<SurfaceRange>* referenced_surfaces) { std::vector<SurfaceRange>* referenced_surfaces) {
switch (desc.material) { switch (desc.material) {
case DrawQuad::SOLID_COLOR: case DrawQuad::SOLID_COLOR:
cc::AddQuad(pass, gfx::Rect(0, 0, 5, 5), desc.color); cc::AddQuad(pass, desc.rect, desc.color);
break; break;
case DrawQuad::SURFACE_CONTENT: case DrawQuad::SURFACE_CONTENT:
referenced_surfaces->emplace_back(desc.surface_range); referenced_surfaces->emplace_back(desc.surface_range);
...@@ -797,7 +797,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, FallbackSurfaceReference) { ...@@ -797,7 +797,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, FallbackSurfaceReference) {
// Bottom guttter. // Bottom guttter.
Quad::SolidColorQuad(SK_ColorWHITE, gfx::Rect(0, 5, 5, 10)), Quad::SolidColorQuad(SK_ColorWHITE, gfx::Rect(0, 5, 5, 10)),
// Contents of the fallback surface. // Contents of the fallback surface.
Quad::SolidColorQuad(SK_ColorRED, gfx::Rect(5, 5)), Quad::SolidColorQuad(SK_ColorRED, gfx::Rect(fallback_size)),
}; };
std::vector<Pass> expected_passes1 = {Pass(expected_quads1, SurfaceSize())}; std::vector<Pass> expected_passes1 = {Pass(expected_quads1, SurfaceSize())};
......
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