| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/trees/layer_tree_impl.h" | 5 #include "cc/trees/layer_tree_impl.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "cc/layers/heads_up_display_layer_impl.h" | 9 #include "cc/layers/heads_up_display_layer_impl.h" |
| 10 #include "cc/test/fake_layer_tree_host_impl.h" | 10 #include "cc/test/fake_layer_tree_host_impl.h" |
| (...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 grand_child->SetPosition(gfx::PointF(0.f, 40.f)); | 1066 grand_child->SetPosition(gfx::PointF(0.f, 40.f)); |
| 1067 grand_child->SetBounds(gfx::Size(100, 50)); | 1067 grand_child->SetBounds(gfx::Size(100, 50)); |
| 1068 grand_child->SetDrawsContent(true); | 1068 grand_child->SetDrawsContent(true); |
| 1069 grand_child->test_properties()->force_render_surface = true; | 1069 grand_child->test_properties()->force_render_surface = true; |
| 1070 | 1070 |
| 1071 // This should let |grand_child| "escape" |child|'s clip. | 1071 // This should let |grand_child| "escape" |child|'s clip. |
| 1072 grand_child->test_properties()->clip_parent = root; | 1072 grand_child->test_properties()->clip_parent = root; |
| 1073 std::unique_ptr<std::set<LayerImpl*>> clip_children( | 1073 std::unique_ptr<std::set<LayerImpl*>> clip_children( |
| 1074 new std::set<LayerImpl*>); | 1074 new std::set<LayerImpl*>); |
| 1075 clip_children->insert(grand_child.get()); | 1075 clip_children->insert(grand_child.get()); |
| 1076 root->test_properties()->clip_children.reset(clip_children.release()); | 1076 root->test_properties()->clip_children = std::move(clip_children); |
| 1077 | 1077 |
| 1078 child->test_properties()->AddChild(std::move(grand_child)); | 1078 child->test_properties()->AddChild(std::move(grand_child)); |
| 1079 root->test_properties()->AddChild(std::move(child)); | 1079 root->test_properties()->AddChild(std::move(child)); |
| 1080 } | 1080 } |
| 1081 | 1081 |
| 1082 host_impl().SetViewportSize(root->bounds()); | 1082 host_impl().SetViewportSize(root->bounds()); |
| 1083 host_impl().UpdateNumChildrenAndDrawPropertiesForActiveTree(); | 1083 host_impl().UpdateNumChildrenAndDrawPropertiesForActiveTree(); |
| 1084 | 1084 |
| 1085 gfx::PointF test_point(12.f, 52.f); | 1085 gfx::PointF test_point(12.f, 52.f); |
| 1086 LayerImpl* result_layer = | 1086 LayerImpl* result_layer = |
| (...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2401 auto weak_promise = promise->AsWeakPtr(); | 2401 auto weak_promise = promise->AsWeakPtr(); |
| 2402 host_impl().active_tree()->QueueSwapPromise(std::move(promise)); | 2402 host_impl().active_tree()->QueueSwapPromise(std::move(promise)); |
| 2403 host_impl().active_tree()->BreakSwapPromises( | 2403 host_impl().active_tree()->BreakSwapPromises( |
| 2404 SwapPromise::DidNotSwapReason::SWAP_FAILS); | 2404 SwapPromise::DidNotSwapReason::SWAP_FAILS); |
| 2405 EXPECT_FALSE(weak_promise); | 2405 EXPECT_FALSE(weak_promise); |
| 2406 } | 2406 } |
| 2407 } | 2407 } |
| 2408 | 2408 |
| 2409 } // namespace | 2409 } // namespace |
| 2410 } // namespace cc | 2410 } // namespace cc |
| OLD | NEW |