summaryrefslogtreecommitdiffstats
path: root/cc/resources/picture_pile_impl_unittest.cc
diff options
context:
space:
mode:
authorenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-21 21:31:44 +0000
committerenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-21 21:31:44 +0000
commitbec08429286ff70c2ce5514ba44c8058fc058a27 (patch)
treed3f04253d5ba58348f533386fa352203e1650b41 /cc/resources/picture_pile_impl_unittest.cc
parent2fccd420c7523d8379367cc1c8a3fc962b4babe1 (diff)
downloadchromium_src-bec08429286ff70c2ce5514ba44c8058fc058a27.zip
chromium_src-bec08429286ff70c2ce5514ba44c8058fc058a27.tar.gz
chromium_src-bec08429286ff70c2ce5514ba44c8058fc058a27.tar.bz2
Add flag for drawing layers to screen with Ganesh
The --force-direct-layer-drawing flag causes any layer that could be drawn direct to the backbuffer to be drawn to the backbuffer using Ganesh. This flag also requires both the --enable-threaded-compositing flag and the --enable-impl-side-painting flag to have any effect. This patch also turns on testing for PictureDrawQuad using Ganesh in the cc pixeltests. BUG=none Review URL: https://chromiumcodereview.appspot.com/13863015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201362 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resources/picture_pile_impl_unittest.cc')
-rw-r--r--cc/resources/picture_pile_impl_unittest.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/cc/resources/picture_pile_impl_unittest.cc b/cc/resources/picture_pile_impl_unittest.cc
index 10c859e..5fe7b2f 100644
--- a/cc/resources/picture_pile_impl_unittest.cc
+++ b/cc/resources/picture_pile_impl_unittest.cc
@@ -131,6 +131,21 @@ TEST(PicturePileImplTest, AnalyzeIsSolidScaled) {
EXPECT_EQ(analysis.solid_color, solid_color);
}
+TEST(PicturePileImplTest, AnalyzeIsSolidEmpty) {
+ gfx::Size tile_size(100, 100);
+ gfx::Size layer_bounds(400, 400);
+
+ scoped_refptr<FakePicturePileImpl> pile =
+ FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds);
+ PicturePileImpl::Analysis analysis;
+ EXPECT_FALSE(analysis.is_solid_color);
+
+ pile->AnalyzeInRect(gfx::Rect(0, 0, 400, 400), 1.f, &analysis);
+
+ EXPECT_TRUE(analysis.is_solid_color);
+ EXPECT_EQ(analysis.solid_color, SkColorSetARGB(0, 0, 0, 0));
+}
+
TEST(PicturePileImplTest, PixelRefIteratorEmpty) {
gfx::Size tile_size(128, 128);
gfx::Size layer_bounds(256, 256);