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

Unified Diff: cc/layers/delegated_renderer_layer_impl_unittest.cc

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 11 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/debug/rendering_stats_instrumentation.cc ('k') | cc/layers/layer.h » ('j') | 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 395d3619e801215370ab3dfcb434f9b1498e2cdb..aaef9f2d16233fad2e84ac02e8099b300dbeae8d 100644
--- a/cc/layers/delegated_renderer_layer_impl_unittest.cc
+++ b/cc/layers/delegated_renderer_layer_impl_unittest.cc
@@ -769,9 +769,9 @@ TEST_F(DelegatedRendererLayerImplTestTransform, QuadsUnclipped_Surface) {
&root_delegated_shared_quad_state,
&contrib_delegated_shared_quad_state);
- // When the layer owns a surface, then its position and translation are not
- // a part of its draw transform.
- EXPECT_EQ(gfx::Rect(10, 10, 35, 35).ToString(),
+ // When the layer owns a surface, then its translation is not part of its
+ // draw transform, but its scale is.
+ EXPECT_EQ(gfx::Rect(20, 20, 70, 70).ToString(),
root_delegated_shared_quad_state->clip_rect.ToString());
// Since the layer owns a surface it doesn't need to clip its quads, so
@@ -779,8 +779,9 @@ TEST_F(DelegatedRendererLayerImplTestTransform, QuadsUnclipped_Surface) {
EXPECT_FALSE(root_delegated_shared_quad_state->is_clipped);
gfx::Transform expected;
- // This is the transform within the source frame.
- expected.Scale(1.5, 1.5);
+ // This is the transform within the source frame scaled by the delegated
+ // render layer transform.
+ expected.Scale(3.0, 3.0);
expected.Translate(7.0, 7.0);
EXPECT_TRANSFORMATION_MATRIX_EQ(
expected, root_delegated_shared_quad_state->content_to_target_transform);
@@ -817,17 +818,18 @@ TEST_F(DelegatedRendererLayerImplTestTransform, QuadsClipped_Surface) {
&root_delegated_shared_quad_state,
&contrib_delegated_shared_quad_state);
- // When the layer owns a surface, then its position and translation are not
- // a part of its draw transform. The clip_rect should be preserved.
- EXPECT_EQ(gfx::Rect(10, 10, 35, 35).ToString(),
+ // When the layer owns a surface, then its translation is not part of its
+ // draw transform, but its scale is.
+ EXPECT_EQ(gfx::Rect(20, 20, 70, 70).ToString(),
root_delegated_shared_quad_state->clip_rect.ToString());
// The quads had a clip and it should be preserved.
EXPECT_TRUE(root_delegated_shared_quad_state->is_clipped);
gfx::Transform expected;
- // This is the transform within the source frame.
- expected.Scale(1.5, 1.5);
+ // This is the transform within the source frame scaled by the delegated
+ // render layer transform.
+ expected.Scale(3.0, 3.0);
expected.Translate(7.0, 7.0);
EXPECT_TRANSFORMATION_MATRIX_EQ(
expected, root_delegated_shared_quad_state->content_to_target_transform);
« no previous file with comments | « cc/debug/rendering_stats_instrumentation.cc ('k') | cc/layers/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698