| 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/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <cmath> | 10 #include <cmath> |
| (...skipping 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2110 scroll_child->SetPosition(gfx::PointF(20.f, 20.f)); | 2110 scroll_child->SetPosition(gfx::PointF(20.f, 20.f)); |
| 2111 scroll_child_clip->test_properties()->AddChild(std::move(scroll_child)); | 2111 scroll_child_clip->test_properties()->AddChild(std::move(scroll_child)); |
| 2112 | 2112 |
| 2113 child_clip = scroll_child_clip.get(); | 2113 child_clip = scroll_child_clip.get(); |
| 2114 viewport_scroll->test_properties()->AddChild(std::move(scroll_child_clip)); | 2114 viewport_scroll->test_properties()->AddChild(std::move(scroll_child_clip)); |
| 2115 | 2115 |
| 2116 child_clip->test_properties()->scroll_parent = parent; | 2116 child_clip->test_properties()->scroll_parent = parent; |
| 2117 std::unique_ptr<std::set<LayerImpl*>> scroll_children( | 2117 std::unique_ptr<std::set<LayerImpl*>> scroll_children( |
| 2118 new std::set<LayerImpl*>); | 2118 new std::set<LayerImpl*>); |
| 2119 scroll_children->insert(child_clip); | 2119 scroll_children->insert(child_clip); |
| 2120 parent->test_properties()->scroll_children.reset(scroll_children.release()); | 2120 parent->test_properties()->scroll_children = std::move(scroll_children); |
| 2121 host_impl_->active_tree()->BuildPropertyTreesForTesting(); | 2121 host_impl_->active_tree()->BuildPropertyTreesForTesting(); |
| 2122 | 2122 |
| 2123 DrawFrame(); | 2123 DrawFrame(); |
| 2124 | 2124 |
| 2125 { | 2125 { |
| 2126 host_impl_->ScrollBegin(BeginState(gfx::Point(21, 21)).get(), | 2126 host_impl_->ScrollBegin(BeginState(gfx::Point(21, 21)).get(), |
| 2127 InputHandler::TOUCHSCREEN); | 2127 InputHandler::TOUCHSCREEN); |
| 2128 host_impl_->ScrollBy( | 2128 host_impl_->ScrollBy( |
| 2129 UpdateState(gfx::Point(21, 21), gfx::Vector2d(5, 5)).get()); | 2129 UpdateState(gfx::Point(21, 21), gfx::Vector2d(5, 5)).get()); |
| 2130 host_impl_->ScrollBy( | 2130 host_impl_->ScrollBy( |
| (...skipping 9863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11994 else | 11994 else |
| 11995 EXPECT_FALSE(tile->HasRasterTask()); | 11995 EXPECT_FALSE(tile->HasRasterTask()); |
| 11996 } | 11996 } |
| 11997 Region expected_invalidation( | 11997 Region expected_invalidation( |
| 11998 raster_source->GetRectForImage(checkerable_image->uniqueID())); | 11998 raster_source->GetRectForImage(checkerable_image->uniqueID())); |
| 11999 EXPECT_EQ(expected_invalidation, *(root->GetPendingInvalidation())); | 11999 EXPECT_EQ(expected_invalidation, *(root->GetPendingInvalidation())); |
| 12000 } | 12000 } |
| 12001 | 12001 |
| 12002 } // namespace | 12002 } // namespace |
| 12003 } // namespace cc | 12003 } // namespace cc |
| OLD | NEW |