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

Unified Diff: cc/trees/layer_tree_host_unittest_delegated.cc

Issue 313403005: Revert of Invert DSF to map from delegated frame to layer space (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/test/fake_delegated_renderer_layer_impl.cc ('k') | content/common/cc_messages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_delegated.cc
diff --git a/cc/trees/layer_tree_host_unittest_delegated.cc b/cc/trees/layer_tree_host_unittest_delegated.cc
index dfef15effb348ae662377f1c6f34d32b378cc05b..abd5e4b1e914d30f606346741517fb5463c0f7bc 100644
--- a/cc/trees/layer_tree_host_unittest_delegated.cc
+++ b/cc/trees/layer_tree_host_unittest_delegated.cc
@@ -486,8 +486,9 @@
CreateFrameData(gfx::Rect(0, 0, 20, 20), gfx::Rect(0, 0, 0, 0)));
break;
case 3:
- // Should create a total amount of gfx::Rect(2, 2, 8, 6) damage:
- // (2, 2, 10, 6) clamped to the root output rect.
+ // Should create a total amount of gfx::Rect(2, 2, 10, 6) damage.
+ // The frame size is 20x20 while the layer is 10x10, so this should
+ // produce a gfx::Rect(1, 1, 5, 3) damage rect.
SetFrameData(
CreateFrameData(gfx::Rect(0, 0, 20, 20), gfx::Rect(2, 2, 5, 5)));
SetFrameData(
@@ -534,7 +535,9 @@
gfx::Rect(4, 4, 1, 1)));
break;
case 13:
- // Should create gfx::Rect(1, 1, 2, 2) of damage.
+ // Should create gfx::Rect(1, 1, 2, 2) of damage. The frame size is
+ // 5x5 and the display size is now set to 10x10, so this should result
+ // in a gfx::Rect(2, 2, 4, 4) damage rect.
SetFrameData(
CreateFrameData(gfx::Rect(0, 0, 5, 5), gfx::Rect(1, 1, 2, 2)));
break;
@@ -580,7 +583,6 @@
// ways.
SetFrameData(
CreateFrameData(gfx::Rect(0, 0, 10, 10), gfx::Rect(3, 3, 1, 1)));
- break;
}
first_draw_for_source_frame_ = true;
}
@@ -614,7 +616,7 @@
EXPECT_EQ(gfx::Rect(10, 10).ToString(), damage_rect.ToString());
break;
case 3:
- EXPECT_EQ(gfx::Rect(2, 2, 8, 6).ToString(), damage_rect.ToString());
+ EXPECT_EQ(gfx::Rect(1, 1, 5, 3).ToString(), damage_rect.ToString());
break;
case 4:
EXPECT_EQ(gfx::Rect().ToString(), damage_rect.ToString());
@@ -644,7 +646,7 @@
EXPECT_EQ(gfx::Rect().ToString(), damage_rect.ToString());
break;
case 13:
- EXPECT_EQ(gfx::Rect(1, 1, 2, 2).ToString(), damage_rect.ToString());
+ EXPECT_EQ(gfx::Rect(2, 2, 4, 4).ToString(), damage_rect.ToString());
break;
case 14:
EXPECT_EQ(gfx::Rect().ToString(), damage_rect.ToString());
« no previous file with comments | « cc/test/fake_delegated_renderer_layer_impl.cc ('k') | content/common/cc_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698