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

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 2117173002: cc: Don't skip clip rect calculation for copy request layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/trees/draw_property_utils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common_unittest.cc
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index f0a89135b62514c214bd11a8781c6dfab8ec6415..8797ea3d3bf5940ac41d47f64f70a09ac19f634a 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -5831,7 +5831,9 @@ TEST_F(LayerTreeHostCommonTest, VisibleRectInNonRootCopyRequest) {
copy_layer->test_properties()->copy_requests.push_back(
CopyOutputRequest::CreateRequest(base::Bind(&EmptyCopyOutputCallback)));
+ DCHECK(!copy_layer->test_properties()->copy_requests.empty());
ExecuteCalculateDrawProperties(root);
+ DCHECK(copy_layer->test_properties()->copy_requests.empty());
EXPECT_EQ(gfx::Rect(100, 100), copy_layer->visible_layer_rect());
EXPECT_EQ(gfx::Rect(20, 20), copy_child->visible_layer_rect());
@@ -5841,9 +5843,13 @@ TEST_F(LayerTreeHostCommonTest, VisibleRectInNonRootCopyRequest) {
// Case 2: When the non root copy request layer is clipped.
copy_layer->SetBounds(gfx::Size(50, 50));
copy_layer->SetMasksToBounds(true);
+ copy_layer->test_properties()->copy_requests.push_back(
+ CopyOutputRequest::CreateRequest(base::Bind(&EmptyCopyOutputCallback)));
root->layer_tree_impl()->property_trees()->needs_rebuild = true;
+ DCHECK(!copy_layer->test_properties()->copy_requests.empty());
ExecuteCalculateDrawProperties(root);
+ DCHECK(copy_layer->test_properties()->copy_requests.empty());
EXPECT_EQ(gfx::Rect(50, 50), copy_layer->visible_layer_rect());
EXPECT_EQ(gfx::Rect(10, 10), copy_child->visible_layer_rect());
« no previous file with comments | « cc/trees/draw_property_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698