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

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

Issue 1908593002: cc : Stop pushing transform origin from Layer and LayerImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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_test_properties.h ('k') | cc/layers/layer_utils_unittest.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_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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 root->SetScrollChildren(scroll_children)); 237 root->SetScrollChildren(scroll_children));
238 EXECUTE_AND_VERIFY_NEEDS_PUSH_PROPERTIES_AND_SUBTREE_DID_NOT_CHANGE( 238 EXECUTE_AND_VERIFY_NEEDS_PUSH_PROPERTIES_AND_SUBTREE_DID_NOT_CHANGE(
239 root->SetClipParent(clip_parent.get())); 239 root->SetClipParent(clip_parent.get()));
240 EXECUTE_AND_VERIFY_NEEDS_PUSH_PROPERTIES_AND_SUBTREE_DID_NOT_CHANGE( 240 EXECUTE_AND_VERIFY_NEEDS_PUSH_PROPERTIES_AND_SUBTREE_DID_NOT_CHANGE(
241 root->SetClipChildren(clip_children)); 241 root->SetClipChildren(clip_children));
242 EXECUTE_AND_VERIFY_NEEDS_PUSH_PROPERTIES_AND_SUBTREE_DID_NOT_CHANGE( 242 EXECUTE_AND_VERIFY_NEEDS_PUSH_PROPERTIES_AND_SUBTREE_DID_NOT_CHANGE(
243 root->SetNumDescendantsThatDrawContent(10)); 243 root->SetNumDescendantsThatDrawContent(10));
244 244
245 // After setting all these properties already, setting to the exact same 245 // After setting all these properties already, setting to the exact same
246 // values again should not cause any change. 246 // values again should not cause any change.
247 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(
248 root->SetTransformOrigin(arbitrary_point_3f));
249 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->SetMasksToBounds(true)); 247 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->SetMasksToBounds(true));
250 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE( 248 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(
251 root->SetPosition(arbitrary_point_f)); 249 root->SetPosition(arbitrary_point_f));
252 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE( 250 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(
253 root->SetShouldFlattenTransform(false)); 251 root->SetShouldFlattenTransform(false));
254 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->Set3dSortingContextId(1)); 252 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->Set3dSortingContextId(1));
255 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE( 253 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(
256 root->SetTransform(arbitrary_transform)); 254 root->SetTransform(arbitrary_transform));
257 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE( 255 EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(
258 root->SetDoubleSided(false)); // constructor initializes it to "true". 256 root->SetDoubleSided(false)); // constructor initializes it to "true".
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 665
668 pending_layer->PushPropertiesTo(layer()); 666 pending_layer->PushPropertiesTo(layer());
669 667
670 EXPECT_VECTOR_EQ(gfx::Vector2dF(22, 23), layer()->CurrentScrollOffset()); 668 EXPECT_VECTOR_EQ(gfx::Vector2dF(22, 23), layer()->CurrentScrollOffset());
671 EXPECT_VECTOR_EQ(layer()->CurrentScrollOffset(), 669 EXPECT_VECTOR_EQ(layer()->CurrentScrollOffset(),
672 pending_layer->CurrentScrollOffset()); 670 pending_layer->CurrentScrollOffset());
673 } 671 }
674 672
675 } // namespace 673 } // namespace
676 } // namespace cc 674 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl_test_properties.h ('k') | cc/layers/layer_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698