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_impl.h" | 5 #include "cc/layers/layer_impl.h" |
6 | 6 |
7 #include "cc/animation/mutable_properties.h" | 7 #include "cc/animation/mutable_properties.h" |
8 #include "cc/layers/painted_scrollbar_layer_impl.h" | 8 #include "cc/layers/painted_scrollbar_layer_impl.h" |
9 #include "cc/layers/solid_color_scrollbar_layer_impl.h" | 9 #include "cc/layers/solid_color_scrollbar_layer_impl.h" |
10 #include "cc/output/filter_operation.h" | 10 #include "cc/output/filter_operation.h" |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 arbitrary_filters, root->effect_tree_index(), | 309 arbitrary_filters, root->effect_tree_index(), |
310 host_impl.active_tree())); | 310 host_impl.active_tree())); |
311 | 311 |
312 // Related scrolling functions. | 312 // Related scrolling functions. |
313 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetBounds(large_size)); | 313 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetBounds(large_size)); |
314 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetBounds(large_size)); | 314 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetBounds(large_size)); |
315 host_impl.active_tree()->BuildLayerListAndPropertyTreesForTesting(); | 315 host_impl.active_tree()->BuildLayerListAndPropertyTreesForTesting(); |
316 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->ScrollBy(arbitrary_vector2d)); | 316 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->ScrollBy(arbitrary_vector2d)); |
317 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->ScrollBy(gfx::Vector2d())); | 317 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->ScrollBy(gfx::Vector2d())); |
318 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES( | 318 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES( |
319 layer->layer_tree_impl()->DidUpdateScrollOffset( | 319 layer->layer_tree_impl()->DidUpdateScrollOffset(layer->id())); |
320 layer->id(), layer->transform_tree_index())); | |
321 layer->layer_tree_impl() | 320 layer->layer_tree_impl() |
322 ->property_trees() | 321 ->property_trees() |
323 ->scroll_tree.SetScrollOffsetDeltaForTesting(layer->id(), | 322 ->scroll_tree.SetScrollOffsetDeltaForTesting(layer->id(), |
324 gfx::Vector2dF()); | 323 gfx::Vector2dF()); |
325 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetCurrentScrollOffset( | 324 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetCurrentScrollOffset( |
326 gfx::ScrollOffset(arbitrary_vector2d.x(), arbitrary_vector2d.y()))); | 325 gfx::ScrollOffset(arbitrary_vector2d.x(), arbitrary_vector2d.y()))); |
327 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetCurrentScrollOffset( | 326 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetCurrentScrollOffset( |
328 gfx::ScrollOffset(arbitrary_vector2d.x(), arbitrary_vector2d.y()))); | 327 gfx::ScrollOffset(arbitrary_vector2d.x(), arbitrary_vector2d.y()))); |
329 | 328 |
330 // Unrelated functions, always set to new values, always set needs update. | 329 // Unrelated functions, always set to new values, always set needs update. |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 | 593 |
595 pending_layer->PushPropertiesTo(layer()); | 594 pending_layer->PushPropertiesTo(layer()); |
596 | 595 |
597 EXPECT_VECTOR_EQ(gfx::Vector2dF(22, 23), layer()->CurrentScrollOffset()); | 596 EXPECT_VECTOR_EQ(gfx::Vector2dF(22, 23), layer()->CurrentScrollOffset()); |
598 EXPECT_VECTOR_EQ(layer()->CurrentScrollOffset(), | 597 EXPECT_VECTOR_EQ(layer()->CurrentScrollOffset(), |
599 pending_layer->CurrentScrollOffset()); | 598 pending_layer->CurrentScrollOffset()); |
600 } | 599 } |
601 | 600 |
602 } // namespace | 601 } // namespace |
603 } // namespace cc | 602 } // namespace cc |
OLD | NEW |