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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES( | 312 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES( |
313 layer->OnOpacityAnimated(arbitrary_number)); | 313 layer->OnOpacityAnimated(arbitrary_number)); |
314 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetBlendMode(arbitrary_blend_mode); | 314 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetBlendMode(arbitrary_blend_mode); |
315 layer->NoteLayerPropertyChanged()); | 315 layer->NoteLayerPropertyChanged()); |
316 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES( | 316 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES( |
317 layer->OnTransformAnimated(arbitrary_transform)); | 317 layer->OnTransformAnimated(arbitrary_transform)); |
318 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetBounds(arbitrary_size); | 318 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetBounds(arbitrary_size); |
319 layer->NoteLayerPropertyChanged()); | 319 layer->NoteLayerPropertyChanged()); |
320 | 320 |
321 // Unrelated functions, set to the same values, no needs update. | 321 // Unrelated functions, set to the same values, no needs update. |
322 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetFilters(arbitrary_filters)); | 322 layer->test_properties()->filters = arbitrary_filters; |
| 323 host_impl.active_tree()->BuildLayerListAndPropertyTreesForTesting(); |
| 324 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES( |
| 325 layer->OnFilterAnimated(arbitrary_filters)); |
323 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetMasksToBounds(true)); | 326 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetMasksToBounds(true)); |
324 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetContentsOpaque(true)); | 327 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetContentsOpaque(true)); |
325 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES( | 328 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES( |
326 layer2->SetPosition(arbitrary_point_f)); | 329 layer2->SetPosition(arbitrary_point_f)); |
327 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->Set3dSortingContextId(1)); | 330 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->Set3dSortingContextId(1)); |
328 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetDrawsContent(true)); | 331 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetDrawsContent(true)); |
329 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES( | 332 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES( |
330 layer->SetBackgroundColor(arbitrary_color)); | 333 layer->SetBackgroundColor(arbitrary_color)); |
331 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES( | 334 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES( |
332 layer->SetBlendMode(arbitrary_blend_mode)); | 335 layer->SetBlendMode(arbitrary_blend_mode)); |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 | 561 |
559 pending_layer->PushPropertiesTo(layer()); | 562 pending_layer->PushPropertiesTo(layer()); |
560 | 563 |
561 EXPECT_VECTOR_EQ(gfx::Vector2dF(22, 23), layer()->CurrentScrollOffset()); | 564 EXPECT_VECTOR_EQ(gfx::Vector2dF(22, 23), layer()->CurrentScrollOffset()); |
562 EXPECT_VECTOR_EQ(layer()->CurrentScrollOffset(), | 565 EXPECT_VECTOR_EQ(layer()->CurrentScrollOffset(), |
563 pending_layer->CurrentScrollOffset()); | 566 pending_layer->CurrentScrollOffset()); |
564 } | 567 } |
565 | 568 |
566 } // namespace | 569 } // namespace |
567 } // namespace cc | 570 } // namespace cc |
OLD | NEW |