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

Unified Diff: cc/layers/picture_image_layer_impl_unittest.cc

Issue 226283004: Rasterize at maximum scale for scale animations on CPU-rasterized layers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 8 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
« no previous file with comments | « cc/layers/picture_image_layer_impl.cc ('k') | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_image_layer_impl_unittest.cc
diff --git a/cc/layers/picture_image_layer_impl_unittest.cc b/cc/layers/picture_image_layer_impl_unittest.cc
index 72080b184a91d47afefa797658d46baa68d93454..97d522aae36ebaad88e34f77254a6d90dc2565b2 100644
--- a/cc/layers/picture_image_layer_impl_unittest.cc
+++ b/cc/layers/picture_image_layer_impl_unittest.cc
@@ -84,8 +84,13 @@ TEST_F(PictureImageLayerImplTest, CalculateContentsScale) {
float contents_scale_x;
float contents_scale_y;
gfx::Size content_bounds;
- layer->CalculateContentsScale(2.f, 3.f, 4.f, false,
- &contents_scale_x, &contents_scale_y,
+ layer->CalculateContentsScale(2.f,
+ 3.f,
+ 4.f,
+ 1.f,
+ false,
+ &contents_scale_x,
+ &contents_scale_y,
&content_bounds);
EXPECT_FLOAT_EQ(1.f, contents_scale_x);
EXPECT_FLOAT_EQ(1.f, contents_scale_y);
@@ -102,8 +107,13 @@ TEST_F(PictureImageLayerImplTest, AreVisibleResourcesReady) {
float contents_scale_x;
float contents_scale_y;
gfx::Size content_bounds;
- layer->CalculateContentsScale(2.f, 3.f, 4.f, false,
- &contents_scale_x, &contents_scale_y,
+ layer->CalculateContentsScale(2.f,
+ 3.f,
+ 4.f,
+ 1.f,
+ false,
+ &contents_scale_x,
+ &contents_scale_y,
&content_bounds);
layer->UpdateTilePriorities();
@@ -120,6 +130,7 @@ TEST_F(PictureImageLayerImplTest, IgnoreIdealContentScale) {
const float suggested_ideal_contents_scale = 2.f;
const float device_scale_factor = 3.f;
const float page_scale_factor = 4.f;
+ const float maximum_animation_contents_scale = 1.f;
const bool animating_transform_to_screen = false;
float contents_scale_x;
float contents_scale_y;
@@ -127,6 +138,7 @@ TEST_F(PictureImageLayerImplTest, IgnoreIdealContentScale) {
pending_layer->CalculateContentsScale(suggested_ideal_contents_scale,
device_scale_factor,
page_scale_factor,
+ maximum_animation_contents_scale,
animating_transform_to_screen,
&contents_scale_x,
&contents_scale_y,
@@ -140,6 +152,7 @@ TEST_F(PictureImageLayerImplTest, IgnoreIdealContentScale) {
active_layer->CalculateContentsScale(suggested_ideal_contents_scale,
device_scale_factor,
page_scale_factor,
+ maximum_animation_contents_scale,
animating_transform_to_screen,
&contents_scale_x,
&contents_scale_y,
« no previous file with comments | « cc/layers/picture_image_layer_impl.cc ('k') | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698