diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-07-12 14:07:37 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-07-17 10:29:26 +0000 |
commit | ec02ee4181c49b61fce1c8fb99292dbb8139cc90 (patch) | |
tree | 25cde714b2b71eb639d1cd53f5a22e9ba76e14ef /chromium/cc/layers/layer_impl_unittest.cc | |
parent | bb09965444b5bb20b096a291445170876225268d (diff) |
BASELINE: Update Chromium to 59.0.3071.134
Change-Id: Id02ef6fb2204c5fd21668a1c3e6911c83b17585a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/cc/layers/layer_impl_unittest.cc')
-rw-r--r-- | chromium/cc/layers/layer_impl_unittest.cc | 68 |
1 files changed, 25 insertions, 43 deletions
diff --git a/chromium/cc/layers/layer_impl_unittest.cc b/chromium/cc/layers/layer_impl_unittest.cc index b51fae0069a..2180d540d58 100644 --- a/chromium/cc/layers/layer_impl_unittest.cc +++ b/chromium/cc/layers/layer_impl_unittest.cc @@ -4,10 +4,10 @@ #include "cc/layers/layer_impl.h" +#include "cc/base/filter_operation.h" +#include "cc/base/filter_operations.h" #include "cc/layers/painted_scrollbar_layer_impl.h" #include "cc/layers/solid_color_scrollbar_layer_impl.h" -#include "cc/output/filter_operation.h" -#include "cc/output/filter_operations.h" #include "cc/test/animation_test_common.h" #include "cc/test/fake_compositor_frame_sink.h" #include "cc/test/fake_impl_task_runner_provider.h" @@ -139,6 +139,7 @@ TEST(LayerImplTest, VerifyLayerChangesAreTrackedProperly) { host_impl.active_tree()->SetRootLayerForTesting(std::move(root_clip_ptr)); root->test_properties()->force_render_surface = true; + root->SetMasksToBounds(true); root->layer_tree_impl()->ResetAllChangeTracking(); root->test_properties()->AddChild( @@ -178,23 +179,17 @@ TEST(LayerImplTest, VerifyLayerChangesAreTrackedProperly) { // Changing these properties affects the entire subtree of layers. EXECUTE_AND_VERIFY_NO_NEED_TO_PUSH_PROPERTIES_AND_SUBTREE_CHANGED( - host_impl.active_tree()->property_trees()->effect_tree.OnFilterAnimated( - arbitrary_filters, root->effect_tree_index(), - host_impl.active_tree())); + host_impl.active_tree()->SetFilterMutated(root->element_id(), + arbitrary_filters)); EXECUTE_AND_VERIFY_NO_NEED_TO_PUSH_PROPERTIES_AND_SUBTREE_CHANGED( - host_impl.active_tree()->property_trees()->effect_tree.OnFilterAnimated( - FilterOperations(), root->effect_tree_index(), - host_impl.active_tree())); + host_impl.active_tree()->SetFilterMutated(root->element_id(), + FilterOperations())); EXECUTE_AND_VERIFY_NO_NEED_TO_PUSH_PROPERTIES_AND_SUBTREE_CHANGED( - host_impl.active_tree()->property_trees()->effect_tree.OnOpacityAnimated( - arbitrary_number, root->effect_tree_index(), - host_impl.active_tree())); + host_impl.active_tree()->SetOpacityMutated(root->element_id(), + arbitrary_number)); EXECUTE_AND_VERIFY_NO_NEED_TO_PUSH_PROPERTIES_AND_SUBTREE_CHANGED( - host_impl.active_tree() - ->property_trees() - ->transform_tree.OnTransformAnimated(arbitrary_transform, - root->transform_tree_index(), - host_impl.active_tree())); + host_impl.active_tree()->SetTransformMutated(root->element_id(), + arbitrary_transform)); EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->ScrollBy(arbitrary_vector2d); root->SetNeedsPushProperties()); // SetBoundsDelta changes subtree only when masks_to_bounds is true and it @@ -283,22 +278,15 @@ TEST(LayerImplTest, VerifyNeedsUpdateDrawProperties) { host_impl.active_tree()->BuildLayerListAndPropertyTreesForTesting(); // Related filter functions. - VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES( - host_impl.active_tree()->property_trees()->effect_tree.OnFilterAnimated( - arbitrary_filters, root->effect_tree_index(), - host_impl.active_tree())); + VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(host_impl.active_tree()->SetFilterMutated( + root->element_id(), arbitrary_filters)); VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES( - host_impl.active_tree()->property_trees()->effect_tree.OnFilterAnimated( - arbitrary_filters, root->effect_tree_index(), - host_impl.active_tree())); - VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES( - host_impl.active_tree()->property_trees()->effect_tree.OnFilterAnimated( - FilterOperations(), root->effect_tree_index(), - host_impl.active_tree())); - VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES( - host_impl.active_tree()->property_trees()->effect_tree.OnFilterAnimated( - arbitrary_filters, root->effect_tree_index(), - host_impl.active_tree())); + host_impl.active_tree()->SetFilterMutated(root->element_id(), + arbitrary_filters)); + VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(host_impl.active_tree()->SetFilterMutated( + root->element_id(), FilterOperations())); + VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(host_impl.active_tree()->SetFilterMutated( + root->element_id(), arbitrary_filters)); // Related scrolling functions. VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetBounds(large_size)); @@ -332,15 +320,11 @@ TEST(LayerImplTest, VerifyNeedsUpdateDrawProperties) { VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES( layer->SetBackgroundColor(arbitrary_color)); VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES( - host_impl.active_tree()->property_trees()->effect_tree.OnOpacityAnimated( - arbitrary_number, layer->effect_tree_index(), - host_impl.active_tree())); + host_impl.active_tree()->SetOpacityMutated(layer->element_id(), + arbitrary_number)); VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES( - host_impl.active_tree() - ->property_trees() - ->transform_tree.OnTransformAnimated(arbitrary_transform, - layer->transform_tree_index(), - host_impl.active_tree())); + host_impl.active_tree()->SetTransformMutated(layer->element_id(), + arbitrary_transform)); VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetBounds(arbitrary_size); layer->NoteLayerPropertyChanged()); @@ -348,9 +332,8 @@ TEST(LayerImplTest, VerifyNeedsUpdateDrawProperties) { layer->test_properties()->filters = arbitrary_filters; host_impl.active_tree()->BuildLayerListAndPropertyTreesForTesting(); VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES( - host_impl.active_tree()->property_trees()->effect_tree.OnFilterAnimated( - arbitrary_filters, layer->effect_tree_index(), - host_impl.active_tree())); + host_impl.active_tree()->SetFilterMutated(layer->element_id(), + arbitrary_filters)); VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetMasksToBounds(true)); VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetContentsOpaque(true)); VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES( @@ -443,7 +426,6 @@ class LayerImplScrollTest : public testing::Test { LayerTreeSettings settings() { LayerTreeSettings settings; - settings.verify_clip_tree_calculations = true; return settings; } |