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

Side by Side Diff: cc/layers/layer_unittest.cc

Issue 2846653002: cc : Stop pushing layers from hidden subtrees at commit
Patch Set: rebase Created 3 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 unified diff | Download patch
« no previous file with comments | « cc/layers/layer_impl_test_properties.cc ('k') | cc/layers/picture_layer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(1); 300 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(1);
301 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetDoubleSided(false)); 301 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetDoubleSided(false));
302 EXECUTE_AND_VERIFY_SUBTREE_CHANGES_RESET( 302 EXECUTE_AND_VERIFY_SUBTREE_CHANGES_RESET(
303 root->PushPropertiesTo(root_impl.get()); 303 root->PushPropertiesTo(root_impl.get());
304 child->PushPropertiesTo(child_impl.get()); 304 child->PushPropertiesTo(child_impl.get());
305 child2->PushPropertiesTo(child2_impl.get()); 305 child2->PushPropertiesTo(child2_impl.get());
306 grand_child->PushPropertiesTo(grand_child_impl.get())); 306 grand_child->PushPropertiesTo(grand_child_impl.get()));
307 307
308 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(1); 308 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(1);
309 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetHideLayerAndSubtree(true)); 309 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetHideLayerAndSubtree(true));
310
311 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(1);
312 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetHideLayerAndSubtree(false));
310 EXECUTE_AND_VERIFY_SUBTREE_CHANGES_RESET( 313 EXECUTE_AND_VERIFY_SUBTREE_CHANGES_RESET(
311 root->PushPropertiesTo(root_impl.get()); 314 root->PushPropertiesTo(root_impl.get());
312 child->PushPropertiesTo(child_impl.get()); 315 child->PushPropertiesTo(child_impl.get());
313 child2->PushPropertiesTo(child2_impl.get()); 316 child2->PushPropertiesTo(child2_impl.get());
314 grand_child->PushPropertiesTo(grand_child_impl.get())); 317 grand_child->PushPropertiesTo(grand_child_impl.get()));
315 318
316 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(1); 319 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(1);
317 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetBlendMode(arbitrary_blend_mode)); 320 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetBlendMode(arbitrary_blend_mode));
318 EXECUTE_AND_VERIFY_SUBTREE_CHANGES_RESET( 321 EXECUTE_AND_VERIFY_SUBTREE_CHANGES_RESET(
319 root->PushPropertiesTo(root_impl.get()); 322 root->PushPropertiesTo(root_impl.get());
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 test_layer->SetLayerTreeHost(layer_tree_host_.get()); 1489 test_layer->SetLayerTreeHost(layer_tree_host_.get());
1487 // Layer shouldn't have been registered by element id. 1490 // Layer shouldn't have been registered by element id.
1488 EXPECT_EQ(nullptr, layer_tree_host_->LayerByElementId(element_id)); 1491 EXPECT_EQ(nullptr, layer_tree_host_->LayerByElementId(element_id));
1489 1492
1490 test_layer->SetLayerTreeHost(nullptr); 1493 test_layer->SetLayerTreeHost(nullptr);
1491 EXPECT_EQ(nullptr, layer_tree_host_->LayerByElementId(element_id)); 1494 EXPECT_EQ(nullptr, layer_tree_host_->LayerByElementId(element_id));
1492 } 1495 }
1493 1496
1494 } // namespace 1497 } // namespace
1495 } // namespace cc 1498 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl_test_properties.cc ('k') | cc/layers/picture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698