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

Unified Diff: cc/resources/picture_pile_impl_unittest.cc

Issue 732423002: Update from chromium https://crrev.com/304586 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « cc/resources/picture_pile_impl.cc ('k') | cc/resources/picture_pile_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_pile_impl_unittest.cc
diff --git a/cc/resources/picture_pile_impl_unittest.cc b/cc/resources/picture_pile_impl_unittest.cc
index 6dcf740e1ab408587ef01fa9195ea15020108067..6e9afc7fda851cb6d642008763146066bc0e0422 100644
--- a/cc/resources/picture_pile_impl_unittest.cc
+++ b/cc/resources/picture_pile_impl_unittest.cc
@@ -634,17 +634,11 @@ TEST(PicturePileImplTest, PixelRefIteratorDiscardableRefsBaseNonDiscardable) {
}
}
-class FullContentsTest : public ::testing::TestWithParam<bool> {};
-
-TEST_P(FullContentsTest, RasterFullContents) {
+TEST(PicturePileImplTest, RasterFullContents) {
gfx::Size tile_size(1000, 1000);
gfx::Size layer_bounds(3, 5);
float contents_scale = 1.5f;
float raster_divisions = 2.f;
- // Param in this case is whether the content is fully opaque
- // or just filled completely. For this test they should behave the same.
- bool contents_opaque = GetParam();
- bool fills_content = !GetParam();
scoped_refptr<FakePicturePileImpl> pile =
FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds);
@@ -656,8 +650,7 @@ TEST_P(FullContentsTest, RasterFullContents) {
pile->SetMinContentsScale(contents_scale);
pile->set_background_color(SK_ColorBLACK);
- pile->set_contents_opaque(contents_opaque);
- pile->set_contents_fill_bounds_completely(fills_content);
+ pile->SetRequiresClear(false);
pile->set_clear_canvas_with_debug_color(false);
pile->RerecordPile();
@@ -705,10 +698,6 @@ TEST_P(FullContentsTest, RasterFullContents) {
}
}
-INSTANTIATE_TEST_CASE_P(PicturePileImpl,
- FullContentsTest,
- ::testing::Values(false, true));
-
TEST(PicturePileImpl, RasterContentsTransparent) {
gfx::Size tile_size(1000, 1000);
gfx::Size layer_bounds(5, 3);
@@ -717,7 +706,7 @@ TEST(PicturePileImpl, RasterContentsTransparent) {
scoped_refptr<FakePicturePileImpl> pile =
FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds);
pile->set_background_color(SK_ColorTRANSPARENT);
- pile->set_contents_opaque(false);
+ pile->SetRequiresClear(true);
pile->SetMinContentsScale(contents_scale);
pile->set_clear_canvas_with_debug_color(false);
pile->RerecordPile();
@@ -757,7 +746,7 @@ TEST_P(OverlapTest, NoOverlap) {
scoped_refptr<FakePicturePileImpl> pile =
FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds);
pile->set_background_color(SK_ColorTRANSPARENT);
- pile->set_contents_opaque(false);
+ pile->SetRequiresClear(true);
pile->SetMinContentsScale(MinContentsScale());
pile->set_clear_canvas_with_debug_color(true);
SkPaint color_paint;
« no previous file with comments | « cc/resources/picture_pile_impl.cc ('k') | cc/resources/picture_pile_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698