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

Side by Side Diff: cc/layers/layer_unittest.cc

Issue 1599673002: compositor-worker: Remove code from cc_blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix blink_platform_unittests Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « cc/layers/layer_impl_unittest.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
10 #include "cc/animation/animation_host.h" 10 #include "cc/animation/animation_host.h"
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHaveScrollEventHandlers(true)); 977 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHaveScrollEventHandlers(true));
978 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTransform( 978 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTransform(
979 gfx::Transform(0.0, 0.0, 0.0, 0.0, 0.0, 0.0))); 979 gfx::Transform(0.0, 0.0, 0.0, 0.0, 0.0, 0.0)));
980 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetDoubleSided(false)); 980 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetDoubleSided(false));
981 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTouchEventHandlerRegion( 981 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTouchEventHandlerRegion(
982 gfx::Rect(10, 10))); 982 gfx::Rect(10, 10)));
983 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetForceRenderSurface(true)); 983 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetForceRenderSurface(true));
984 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHideLayerAndSubtree(true)); 984 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHideLayerAndSubtree(true));
985 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetElementId(2)); 985 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetElementId(2));
986 EXPECT_SET_NEEDS_COMMIT( 986 EXPECT_SET_NEEDS_COMMIT(
987 1, test_layer->SetMutableProperties(kMutablePropertyTransform)); 987 1, test_layer->SetMutableProperties(MutableProperty::kTransform));
988 988
989 EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, test_layer->SetMaskLayer( 989 EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, test_layer->SetMaskLayer(
990 dummy_layer1.get())); 990 dummy_layer1.get()));
991 EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, test_layer->SetReplicaLayer( 991 EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, test_layer->SetReplicaLayer(
992 dummy_layer2.get())); 992 dummy_layer2.get()));
993 993
994 // The above tests should not have caused a change to the needs_display flag. 994 // The above tests should not have caused a change to the needs_display flag.
995 EXPECT_FALSE(test_layer->NeedsDisplayForTesting()); 995 EXPECT_FALSE(test_layer->NeedsDisplayForTesting());
996 996
997 // As layers are removed from the tree, they will cause a tree sync. 997 // As layers are removed from the tree, they will cause a tree sync.
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
2118 scoped_refptr<Layer> test_layer = Layer::Create(layer_settings_); 2118 scoped_refptr<Layer> test_layer = Layer::Create(layer_settings_);
2119 scoped_ptr<LayerImpl> impl_layer = 2119 scoped_ptr<LayerImpl> impl_layer =
2120 LayerImpl::Create(host_impl_.active_tree(), 1); 2120 LayerImpl::Create(host_impl_.active_tree(), 1);
2121 2121
2122 EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, 2122 EXPECT_SET_NEEDS_FULL_TREE_SYNC(1,
2123 layer_tree_host_->SetRootLayer(test_layer)); 2123 layer_tree_host_->SetRootLayer(test_layer));
2124 2124
2125 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(2); 2125 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(2);
2126 2126
2127 test_layer->SetElementId(2); 2127 test_layer->SetElementId(2);
2128 test_layer->SetMutableProperties(kMutablePropertyTransform); 2128 test_layer->SetMutableProperties(MutableProperty::kTransform);
2129 2129
2130 EXPECT_EQ(0lu, impl_layer->element_id()); 2130 EXPECT_EQ(0lu, impl_layer->element_id());
2131 EXPECT_EQ(kMutablePropertyNone, impl_layer->mutable_properties()); 2131 EXPECT_EQ(MutableProperty::kNone, impl_layer->mutable_properties());
2132 2132
2133 test_layer->PushPropertiesTo(impl_layer.get()); 2133 test_layer->PushPropertiesTo(impl_layer.get());
2134 2134
2135 EXPECT_EQ(2lu, impl_layer->element_id()); 2135 EXPECT_EQ(2lu, impl_layer->element_id());
2136 EXPECT_EQ(kMutablePropertyTransform, impl_layer->mutable_properties()); 2136 EXPECT_EQ(MutableProperty::kTransform, impl_layer->mutable_properties());
2137 } 2137 }
2138 2138
2139 } // namespace 2139 } // namespace
2140 } // namespace cc 2140 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl_unittest.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698