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

Unified Diff: ui/compositor/layer_unittest.cc

Issue 634113002: Use solid color layer for delegated surface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« ash/display/mirror_window_controller.cc ('K') | « ui/compositor/layer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_unittest.cc
diff --git a/ui/compositor/layer_unittest.cc b/ui/compositor/layer_unittest.cc
index e83eb33e0f1c3585be0b2390bb790df49877dc74..0f3a94523f672a578e9864d194dfd04ccd963d7c 100644
--- a/ui/compositor/layer_unittest.cc
+++ b/ui/compositor/layer_unittest.cc
@@ -667,8 +667,7 @@ void ReturnMailbox(bool* run, uint32 sync_point, bool is_lost) {
}
TEST_F(LayerWithNullDelegateTest, SwitchLayerPreservesCCLayerState) {
- scoped_ptr<Layer> l1(CreateColorLayer(SK_ColorRED,
- gfx::Rect(20, 20, 400, 400)));
+ scoped_ptr<Layer> l1(CreateLayer(LAYER_SOLID_COLOR));
l1->SetFillsBoundsOpaquely(true);
l1->SetForceRenderSurface(true);
l1->SetVisible(false);
@@ -706,7 +705,7 @@ TEST_F(LayerWithNullDelegateTest, SwitchLayerPreservesCCLayerState) {
EXPECT_TRUE(callback1_run);
EXPECT_FALSE(callback2_run);
- l1->SetShowPaintedContent();
+ l1->SetShowSolidColorContent();
EXPECT_EQ(gfx::Point3F(), l1->cc_layer()->transform_origin());
EXPECT_TRUE(l1->cc_layer()->DrawsContent());
EXPECT_TRUE(l1->cc_layer()->contents_opaque());
@@ -1491,15 +1490,16 @@ TEST_F(LayerWithDelegateTest, DelegatedLayer) {
TEST_F(LayerWithDelegateTest, ExternalContent) {
scoped_ptr<Layer> root(CreateNoTextureLayer(gfx::Rect(0, 0, 1000, 1000)));
- scoped_ptr<Layer> child(CreateLayer(LAYER_TEXTURED));
+ scoped_ptr<Layer> child(CreateLayer(LAYER_SOLID_COLOR));
child->SetBounds(gfx::Rect(0, 0, 10, 10));
child->SetVisible(true);
root->Add(child.get());
- // The layer is already showing painted content, so the cc layer won't change.
+ // The layer is already showing solid color content, so the cc layer won't
+ // change.
scoped_refptr<cc::Layer> before = child->cc_layer();
- child->SetShowPaintedContent();
+ child->SetShowSolidColorContent();
EXPECT_TRUE(child->cc_layer());
EXPECT_EQ(before.get(), child->cc_layer());
@@ -1517,7 +1517,7 @@ TEST_F(LayerWithDelegateTest, ExternalContent) {
// Changing to painted content should change the underlying cc layer.
before = child->cc_layer();
- child->SetShowPaintedContent();
+ child->SetShowSolidColorContent();
EXPECT_TRUE(child->cc_layer());
EXPECT_NE(before.get(), child->cc_layer());
}
« ash/display/mirror_window_controller.cc ('K') | « ui/compositor/layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698