| OLD | NEW |
| 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetBlendMode(arbitrary_blend_mode)); | 317 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetBlendMode(arbitrary_blend_mode)); |
| 318 EXECUTE_AND_VERIFY_SUBTREE_CHANGES_RESET( | 318 EXECUTE_AND_VERIFY_SUBTREE_CHANGES_RESET( |
| 319 root->PushPropertiesTo(root_impl.get()); | 319 root->PushPropertiesTo(root_impl.get()); |
| 320 child->PushPropertiesTo(child_impl.get()); | 320 child->PushPropertiesTo(child_impl.get()); |
| 321 child2->PushPropertiesTo(child2_impl.get()); | 321 child2->PushPropertiesTo(child2_impl.get()); |
| 322 grand_child->PushPropertiesTo(grand_child_impl.get())); | 322 grand_child->PushPropertiesTo(grand_child_impl.get())); |
| 323 | 323 |
| 324 // Should be a different size than previous call, to ensure it marks tree | 324 // Should be a different size than previous call, to ensure it marks tree |
| 325 // changed. | 325 // changed. |
| 326 gfx::Size arbitrary_size = gfx::Size(111, 222); | 326 gfx::Size arbitrary_size = gfx::Size(111, 222); |
| 327 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(1); | 327 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(2); |
| 328 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetBounds(arbitrary_size)); | 328 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetBounds(arbitrary_size)); |
| 329 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(dummy_layer1->SetBounds(arbitrary_size)); |
| 329 EXECUTE_AND_VERIFY_SUBTREE_CHANGES_RESET( | 330 EXECUTE_AND_VERIFY_SUBTREE_CHANGES_RESET( |
| 330 root->PushPropertiesTo(root_impl.get()); | 331 root->PushPropertiesTo(root_impl.get()); |
| 331 child->PushPropertiesTo(child_impl.get()); | 332 child->PushPropertiesTo(child_impl.get()); |
| 332 child2->PushPropertiesTo(child2_impl.get()); | 333 child2->PushPropertiesTo(child2_impl.get()); |
| 333 grand_child->PushPropertiesTo(grand_child_impl.get())); | 334 grand_child->PushPropertiesTo(grand_child_impl.get())); |
| 334 | 335 |
| 335 FilterOperations arbitrary_filters; | 336 FilterOperations arbitrary_filters; |
| 336 arbitrary_filters.Append(FilterOperation::CreateOpacityFilter(0.5f)); | 337 arbitrary_filters.Append(FilterOperation::CreateOpacityFilter(0.5f)); |
| 337 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(1); | 338 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(1); |
| 338 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetFilters(arbitrary_filters)); | 339 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetFilters(arbitrary_filters)); |
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1483 test_layer->SetLayerTreeHost(layer_tree_host_.get()); | 1484 test_layer->SetLayerTreeHost(layer_tree_host_.get()); |
| 1484 // Layer shouldn't have been registered by element id. | 1485 // Layer shouldn't have been registered by element id. |
| 1485 EXPECT_EQ(nullptr, layer_tree_host_->LayerByElementId(element_id)); | 1486 EXPECT_EQ(nullptr, layer_tree_host_->LayerByElementId(element_id)); |
| 1486 | 1487 |
| 1487 test_layer->SetLayerTreeHost(nullptr); | 1488 test_layer->SetLayerTreeHost(nullptr); |
| 1488 EXPECT_EQ(nullptr, layer_tree_host_->LayerByElementId(element_id)); | 1489 EXPECT_EQ(nullptr, layer_tree_host_->LayerByElementId(element_id)); |
| 1489 } | 1490 } |
| 1490 | 1491 |
| 1491 } // namespace | 1492 } // namespace |
| 1492 } // namespace cc | 1493 } // namespace cc |
| OLD | NEW |