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

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 2017263002: cc: Move copy requests from layers to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo in comment Created 4 years, 7 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/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | 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 2a2ca196f6278a3fd4e6a6584bc15eaa11e508b9..8654a6bb46bf455e0066930074c044f65cb541e3 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -5532,11 +5532,8 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHiddenWithCopyRequest) {
->hide_layer_and_subtree = true;
copy_grand_child_layer->test_properties()->hide_layer_and_subtree = true;
- std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests;
- copy_requests.push_back(
+ copy_layer->test_properties()->copy_requests.push_back(
CopyOutputRequest::CreateRequest(base::Bind(&EmptyCopyOutputCallback)));
- copy_layer->PassCopyRequests(&copy_requests);
- EXPECT_TRUE(copy_layer->HasCopyRequest());
LayerImplList render_surface_layer_list;
LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs(
@@ -5639,11 +5636,8 @@ TEST_F(LayerTreeHostCommonTest, ClippedOutCopyRequest) {
true, false, false);
copy_child->SetDrawsContent(true);
- std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests;
- copy_requests.push_back(
+ copy_layer->test_properties()->copy_requests.push_back(
CopyOutputRequest::CreateRequest(base::Bind(&EmptyCopyOutputCallback)));
- copy_layer->PassCopyRequests(&copy_requests);
- EXPECT_TRUE(copy_layer->HasCopyRequest());
copy_layer->AddChild(std::move(copy_child));
copy_parent->AddChild(std::move(copy_layer));
@@ -8743,15 +8737,13 @@ TEST_F(LayerTreeHostCommonTest, SkippingLayerImpl) {
// Now, even though child has zero opacity, we will configure |grandchild| and
// |greatgrandchild| in several ways that should force the subtree to be
// processed anyhow.
- std::vector<std::unique_ptr<CopyOutputRequest>> requests;
- requests.push_back(CopyOutputRequest::CreateEmptyRequest());
-
- grandchild_ptr->PassCopyRequests(&requests);
+ grandchild_ptr->test_properties()->copy_requests.push_back(
+ CopyOutputRequest::CreateEmptyRequest());
root_ptr->layer_tree_impl()->property_trees()->needs_rebuild = true;
ExecuteCalculateDrawPropertiesWithPropertyTrees(root_ptr);
EXPECT_EQ(gfx::Rect(10, 10), grandchild_ptr->visible_layer_rect());
- requests.clear();
- grandchild_ptr->PassCopyRequests(&requests);
+
+ host_impl.active_tree()->property_trees()->effect_tree.ClearCopyRequests();
child_ptr->SetOpacity(1.f);
// A double sided render surface with backface visible should not be skipped
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698