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

Unified Diff: cc/quads/draw_quad_unittest.cc

Issue 1380653003: Mac Overlays: Allow SolidColor and Tile quads to be candidates for overlays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@AllOrNothing2
Patch Set: Plumb allow_overlay Created 5 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
Index: cc/quads/draw_quad_unittest.cc
diff --git a/cc/quads/draw_quad_unittest.cc b/cc/quads/draw_quad_unittest.cc
index a1d1a9042f741ff3d958ed9433672feab33abfae..f3bccf15a3c3f199c02618a2b63358a6ab19e7c9 100644
--- a/cc/quads/draw_quad_unittest.cc
+++ b/cc/quads/draw_quad_unittest.cc
@@ -594,16 +594,18 @@ TEST(DrawQuadTest, CopyTileDrawQuad) {
gfx::Size texture_size(85, 32);
bool swizzle_contents = true;
bool nearest_neighbor = true;
+ bool allow_overlay = true;
CREATE_SHARED_STATE();
- CREATE_QUAD_7_NEW(TileDrawQuad,
+ CREATE_QUAD_8_NEW(TileDrawQuad,
opaque_rect,
visible_rect,
resource_id,
tex_coord_rect,
texture_size,
swizzle_contents,
- nearest_neighbor);
+ nearest_neighbor,
+ allow_overlay);
EXPECT_EQ(DrawQuad::TILED_CONTENT, copy_quad->material);
EXPECT_EQ(opaque_rect, copy_quad->opaque_rect);
EXPECT_EQ(visible_rect, copy_quad->visible_rect);
@@ -612,19 +614,22 @@ TEST(DrawQuadTest, CopyTileDrawQuad) {
EXPECT_EQ(texture_size, copy_quad->texture_size);
EXPECT_EQ(swizzle_contents, copy_quad->swizzle_contents);
EXPECT_EQ(nearest_neighbor, copy_quad->nearest_neighbor);
+ EXPECT_EQ(allow_overlay, copy_quad->allow_overlay);
- CREATE_QUAD_5_ALL(TileDrawQuad,
+ CREATE_QUAD_6_ALL(TileDrawQuad,
resource_id,
tex_coord_rect,
texture_size,
swizzle_contents,
- nearest_neighbor);
+ nearest_neighbor,
+ allow_overlay);
EXPECT_EQ(DrawQuad::TILED_CONTENT, copy_quad->material);
EXPECT_EQ(resource_id, copy_quad->resource_id());
EXPECT_EQ(tex_coord_rect, copy_quad->tex_coord_rect);
EXPECT_EQ(texture_size, copy_quad->texture_size);
EXPECT_EQ(swizzle_contents, copy_quad->swizzle_contents);
EXPECT_EQ(nearest_neighbor, copy_quad->nearest_neighbor);
+ EXPECT_EQ(allow_overlay, copy_quad->allow_overlay);
}
TEST(DrawQuadTest, CopyYUVVideoDrawQuad) {
@@ -874,16 +879,18 @@ TEST_F(DrawQuadIteratorTest, TileDrawQuad) {
gfx::Size texture_size(85, 32);
bool swizzle_contents = true;
bool nearest_neighbor = true;
+ bool allow_overlay = true;
CREATE_SHARED_STATE();
- CREATE_QUAD_7_NEW(TileDrawQuad,
+ CREATE_QUAD_8_NEW(TileDrawQuad,
opaque_rect,
visible_rect,
resource_id,
tex_coord_rect,
texture_size,
swizzle_contents,
- nearest_neighbor);
+ nearest_neighbor,
+ allow_overlay);
EXPECT_EQ(resource_id, quad_new->resource_id());
EXPECT_EQ(1, IterateAndCount(quad_new));
EXPECT_EQ(resource_id + 1, quad_new->resource_id());

Powered by Google App Engine
This is Rietveld 408576698