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

Unified Diff: cc/layers/tiled_layer_impl_unittest.cc

Issue 16211002: Skip drawing unsupported layers in forced software mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase on r203584 Created 7 years, 7 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
Index: cc/layers/tiled_layer_impl_unittest.cc
diff --git a/cc/layers/tiled_layer_impl_unittest.cc b/cc/layers/tiled_layer_impl_unittest.cc
index 8a371faab23f96dfbf9c05f2eafd78cef472feaf..42913ef70b72dc2e2ae63ad1848ca6f544b419b6 100644
--- a/cc/layers/tiled_layer_impl_unittest.cc
+++ b/cc/layers/tiled_layer_impl_unittest.cc
@@ -97,7 +97,9 @@ TEST_F(TiledLayerImplTest, EmptyQuadList) {
CreateLayer(tile_size, layer_size, LayerTilingData::NO_BORDER_TEXELS);
MockQuadCuller quad_culler;
AppendQuadsData data;
+ EXPECT_TRUE(layer->WillDraw(DRAW_MODE_HARDWARE, NULL));
layer->AppendQuads(&quad_culler, &data);
+ layer->DidDraw(NULL);
unsigned num_tiles = num_tiles_x * num_tiles_y;
EXPECT_EQ(quad_culler.quad_list().size(), num_tiles);
}
@@ -109,9 +111,7 @@ TEST_F(TiledLayerImplTest, EmptyQuadList) {
layer->draw_properties().visible_content_rect = gfx::Rect();
MockQuadCuller quad_culler;
- AppendQuadsData data;
- layer->AppendQuads(&quad_culler, &data);
- EXPECT_EQ(quad_culler.quad_list().size(), 0u);
+ EXPECT_FALSE(layer->WillDraw(DRAW_MODE_HARDWARE, NULL));
}
// Layer with non-intersecting visible layer rect produces no quads
@@ -124,7 +124,9 @@ TEST_F(TiledLayerImplTest, EmptyQuadList) {
MockQuadCuller quad_culler;
AppendQuadsData data;
+ EXPECT_TRUE(layer->WillDraw(DRAW_MODE_HARDWARE, NULL));
layer->AppendQuads(&quad_culler, &data);
+ layer->DidDraw(NULL);
EXPECT_EQ(quad_culler.quad_list().size(), 0u);
}

Powered by Google App Engine
This is Rietveld 408576698