Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Unified Diff: cc/layers/delegated_renderer_layer_impl_unittest.cc

Issue 546993002: Apply the correct transform_to_root_target DelegatedRendererLayerImpl::AppendRenderPassQuads(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/delegated_renderer_layer_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/delegated_renderer_layer_impl_unittest.cc
diff --git a/cc/layers/delegated_renderer_layer_impl_unittest.cc b/cc/layers/delegated_renderer_layer_impl_unittest.cc
index 94ba6c7de5b889cde896ec033eec7f534b39f097..5a19e9e9a8a0c8650b7ab1ef77f738a0f2336cba 100644
--- a/cc/layers/delegated_renderer_layer_impl_unittest.cc
+++ b/cc/layers/delegated_renderer_layer_impl_unittest.cc
@@ -1481,7 +1481,7 @@ TEST_F(DelegatedRendererLayerImplTest, Occlusion) {
{
gfx::Rect occluded(0, 0, 500, 1000);
// Move the occlusion to where it is in the contributing surface.
- occluded -= quad_rect.OffsetFromOrigin() + gfx::Vector2d(11, 0);
+ occluded -= quad_screen_rect.OffsetFromOrigin();
SCOPED_TRACE("Contributing render pass");
impl.AppendQuadsForPassWithOcclusion(
@@ -1495,10 +1495,10 @@ TEST_F(DelegatedRendererLayerImplTest, Occlusion) {
// The layer outputs one quad, which is partially occluded.
EXPECT_EQ(1u, impl.quad_list().size());
EXPECT_EQ(1u, partially_occluded_count);
- // The quad in the contributing surface is at (211,300) in the root.
+ // The quad in the contributing surface is at (222,300) in the root.
// The occlusion extends to 500 in the x-axis, pushing the left of the
- // visible part of the quad to 500 - 211 = 300 - 11 inside the quad.
- EXPECT_EQ(gfx::Rect(300 - 11, 0, 100 + 11, 500).ToString(),
+ // visible part of the quad to 500 - 222 = 300 - 22 inside the quad.
+ EXPECT_EQ(gfx::Rect(300 - 22, 0, 100 + 22, 500).ToString(),
impl.quad_list()[0]->visible_rect.ToString());
}
}
@@ -1523,10 +1523,10 @@ TEST_F(DelegatedRendererLayerImplTest, Occlusion) {
// The layer outputs one quad, which is partially occluded.
EXPECT_EQ(1u, impl.quad_list().size());
EXPECT_EQ(1u, partially_occluded_count);
- // The quad in the contributing surface is at (222,300) in the transformed
+ // The quad in the contributing surface is at (233,300) in the transformed
// root. The occlusion extends to 500 in the x-axis, pushing the left of the
- // visible part of the quad to 500 - 222 = 300 - 22 inside the quad.
- EXPECT_EQ(gfx::Rect(300 - 22, 0, 100 + 22, 500).ToString(),
+ // visible part of the quad to 500 - 233 = 300 - 33 inside the quad.
+ EXPECT_EQ(gfx::Rect(300 - 33, 0, 100 + 33, 500).ToString(),
impl.quad_list()[0]->visible_rect.ToString());
}
}
« no previous file with comments | « cc/layers/delegated_renderer_layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698