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

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

Issue 295193002: Get rid of graphics layer anchor points, and replace with transform origin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/layer_position_constraint_unittest.cc ('k') | cc/layers/layer_utils.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 "cc/animation/keyframed_animation_curve.h" 7 #include "cc/animation/keyframed_animation_curve.h"
8 #include "cc/base/math_util.h" 8 #include "cc/base/math_util.h"
9 #include "cc/layers/layer_impl.h" 9 #include "cc/layers/layer_impl.h"
10 #include "cc/resources/layer_painter.h" 10 #include "cc/resources/layer_painter.h"
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 534
535 scoped_refptr<Layer> dummy_layer1 = Layer::Create(); 535 scoped_refptr<Layer> dummy_layer1 = Layer::Create();
536 scoped_refptr<Layer> dummy_layer2 = Layer::Create(); 536 scoped_refptr<Layer> dummy_layer2 = Layer::Create();
537 537
538 // sanity check of initial test condition 538 // sanity check of initial test condition
539 EXPECT_FALSE(test_layer->NeedsDisplayForTesting()); 539 EXPECT_FALSE(test_layer->NeedsDisplayForTesting());
540 540
541 // Next, test properties that should call SetNeedsCommit (but not 541 // Next, test properties that should call SetNeedsCommit (but not
542 // SetNeedsDisplay). All properties need to be set to new values in order for 542 // SetNeedsDisplay). All properties need to be set to new values in order for
543 // SetNeedsCommit to be called. 543 // SetNeedsCommit to be called.
544 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetAnchorPoint( 544 EXPECT_SET_NEEDS_COMMIT(
545 gfx::PointF(1.23f, 4.56f))); 545 1, test_layer->SetTransformOrigin(gfx::Point3F(1.23f, 4.56f, 0.f)));
546 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetAnchorPointZ(0.7f));
547 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetBackgroundColor(SK_ColorLTGRAY)); 546 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetBackgroundColor(SK_ColorLTGRAY));
548 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetMasksToBounds(true)); 547 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetMasksToBounds(true));
549 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetOpacity(0.5f)); 548 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetOpacity(0.5f));
550 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetBlendMode(SkXfermode::kHue_Mode)); 549 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetBlendMode(SkXfermode::kHue_Mode));
551 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetIsRootForIsolatedGroup(true)); 550 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetIsRootForIsolatedGroup(true));
552 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetContentsOpaque(true)); 551 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetContentsOpaque(true));
553 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetPosition(gfx::PointF(4.f, 9.f))); 552 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetPosition(gfx::PointF(4.f, 9.f)));
554 // We can use any layer pointer here since we aren't syncing for real. 553 // We can use any layer pointer here since we aren't syncing for real.
555 EXPECT_SET_NEEDS_COMMIT(1, 554 EXPECT_SET_NEEDS_COMMIT(1,
556 test_layer->SetScrollClipLayerId(test_layer->id())); 555 test_layer->SetScrollClipLayerId(test_layer->id()));
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 << "Flags: " << contents_opaque << ", " << layer_opaque << ", " 1142 << "Flags: " << contents_opaque << ", " << layer_opaque << ", "
1144 << host_opaque << "\n"; 1143 << host_opaque << "\n";
1145 } 1144 }
1146 } 1145 }
1147 } 1146 }
1148 } 1147 }
1149 } 1148 }
1150 1149
1151 } // namespace 1150 } // namespace
1152 } // namespace cc 1151 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_position_constraint_unittest.cc ('k') | cc/layers/layer_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698