Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: cc/layers/layer_unittest.cc

Issue 1752993002: cc : Delete LayerImpl::NoteLayerPropertyChangedForSubtree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/layers/layer_unittest.cc
diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc
index 7631e0fd1f439155a930d407f624bd272610ae27..a2fd8bc71f691546274bbef7b4774758ca1d62c8 100644
--- a/cc/layers/layer_unittest.cc
+++ b/cc/layers/layer_unittest.cc
@@ -1064,6 +1064,16 @@ TEST_F(LayerTest, LayerPropertyChangedForSubtree) {
child2->PushPropertiesTo(child2_impl.get());
grand_child->PushPropertiesTo(grand_child_impl.get()));
+ FilterOperations arbitrary_filters;
+ arbitrary_filters.Append(FilterOperation::CreateOpacityFilter(0.5f));
+ EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(1);
+ EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetFilters(arbitrary_filters));
+ EXECUTE_AND_VERIFY_SUBTREE_CHANGES_RESET(
+ root->PushPropertiesTo(root_impl.get());
+ child->PushPropertiesTo(child_impl.get());
+ child2->PushPropertiesTo(child2_impl.get());
+ grand_child->PushPropertiesTo(grand_child_impl.get()));
+
gfx::PointF arbitrary_point_f = gfx::PointF(0.125f, 0.25f);
EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(1);
root->SetPosition(arbitrary_point_f);
@@ -1720,58 +1730,6 @@ TEST_F(LayerTest, PushPropertiesCausesLayerPropertyChangedForOpacity) {
EXPECT_TRUE(impl_layer->LayerPropertyChanged());
}
-TEST_F(LayerTest,
- PushPropsDoesntCauseLayerPropertyChangedDuringImplOnlyFilterAnim) {
- scoped_refptr<Layer> test_layer = Layer::Create(layer_settings_);
- scoped_ptr<LayerImpl> impl_layer =
- LayerImpl::Create(host_impl_.active_tree(), 1);
-
- EXPECT_SET_NEEDS_FULL_TREE_SYNC(1,
- layer_tree_host_->SetRootLayer(test_layer));
-
- scoped_ptr<AnimationRegistrar> registrar;
- if (settings().use_compositor_animation_timelines) {
- AddAnimatedFilterToLayerWithPlayer(impl_layer->id(), timeline_impl(), 1.0,
- 1.f, 2.f);
- } else {
- registrar = AnimationRegistrar::Create();
- impl_layer->layer_animation_controller()->SetAnimationRegistrar(
- registrar.get());
-
- AddAnimatedFilterToController(impl_layer->layer_animation_controller(), 1.0,
- 1.f, 2.f);
- }
-
- FilterOperations filters;
- filters.Append(FilterOperation::CreateBlurFilter(2.f));
- EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetFilters(filters));
-
- EXPECT_FALSE(impl_layer->LayerPropertyChanged());
- test_layer->PushPropertiesTo(impl_layer.get());
- EXPECT_TRUE(impl_layer->LayerPropertyChanged());
-
- impl_layer->ResetAllChangeTrackingForSubtree();
- if (settings().use_compositor_animation_timelines) {
- int animation_id = AddAnimatedFilterToLayerWithPlayer(
- impl_layer->id(), timeline_impl(), 1.0, 1.f, 2.f);
- GetAnimationFromLayerWithExistingPlayer(impl_layer->id(), timeline_impl(),
- animation_id)
- ->set_is_impl_only(true);
- } else {
- AddAnimatedFilterToController(impl_layer->layer_animation_controller(), 1.0,
- 1.f, 2.f);
- impl_layer->layer_animation_controller()
- ->GetAnimation(TargetProperty::FILTER)
- ->set_is_impl_only(true);
- }
- filters.Append(FilterOperation::CreateSepiaFilter(0.5f));
- EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetFilters(filters));
-
- EXPECT_FALSE(impl_layer->LayerPropertyChanged());
- test_layer->PushPropertiesTo(impl_layer.get());
- EXPECT_FALSE(impl_layer->LayerPropertyChanged());
-}
-
TEST_F(LayerTest, MaskAndReplicaHasParent) {
scoped_refptr<Layer> parent = Layer::Create(layer_settings_);
scoped_refptr<Layer> child = Layer::Create(layer_settings_);

Powered by Google App Engine
This is Rietveld 408576698