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

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

Issue 23455060: mix-blend-mode implementation for accelerated layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unittests fixed Created 7 years 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/layers/render_surface_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 "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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 538
539 // Next, test properties that should call SetNeedsCommit (but not 539 // Next, test properties that should call SetNeedsCommit (but not
540 // SetNeedsDisplay). All properties need to be set to new values in order for 540 // SetNeedsDisplay). All properties need to be set to new values in order for
541 // SetNeedsCommit to be called. 541 // SetNeedsCommit to be called.
542 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetAnchorPoint( 542 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetAnchorPoint(
543 gfx::PointF(1.23f, 4.56f))); 543 gfx::PointF(1.23f, 4.56f)));
544 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetAnchorPointZ(0.7f)); 544 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetAnchorPointZ(0.7f));
545 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetBackgroundColor(SK_ColorLTGRAY)); 545 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetBackgroundColor(SK_ColorLTGRAY));
546 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetMasksToBounds(true)); 546 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetMasksToBounds(true));
547 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetOpacity(0.5f)); 547 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetOpacity(0.5f));
548 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetBlendMode(SkXfermode::kHue_Mode));
549 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetIsRootForIsolatedGroup(true));
548 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetContentsOpaque(true)); 550 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetContentsOpaque(true));
549 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetPosition(gfx::PointF(4.f, 9.f))); 551 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetPosition(gfx::PointF(4.f, 9.f)));
550 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetSublayerTransform( 552 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetSublayerTransform(
551 gfx::Transform(0.0, 0.0, 0.0, 0.0, 0.0, 0.0))); 553 gfx::Transform(0.0, 0.0, 0.0, 0.0, 0.0, 0.0)));
552 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetScrollable(true)); 554 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetScrollable(true));
553 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetUserScrollable(true, false)); 555 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetUserScrollable(true, false));
554 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetScrollOffset( 556 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetScrollOffset(
555 gfx::Vector2d(10, 10))); 557 gfx::Vector2d(10, 10)));
556 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetShouldScrollOnMainThread(true)); 558 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetShouldScrollOnMainThread(true));
557 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetNonFastScrollableRegion( 559 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetNonFastScrollableRegion(
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 << "Flags: " << contents_opaque << ", " << layer_opaque << ", " 1074 << "Flags: " << contents_opaque << ", " << layer_opaque << ", "
1073 << host_opaque << "\n"; 1075 << host_opaque << "\n";
1074 } 1076 }
1075 } 1077 }
1076 } 1078 }
1077 } 1079 }
1078 } 1080 }
1079 1081
1080 } // namespace 1082 } // namespace
1081 } // namespace cc 1083 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl_unittest.cc ('k') | cc/layers/render_surface_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698