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

Unified Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 648293006: cc: turn on distance field text on animated layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more test :) Created 6 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
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/layers/tiled_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl_unittest.cc
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc
index 73906afdb61812a840c2ef39d88e69967bc6679e..644bf544e0dcc70e7483169909502a405f0fd143 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -2602,8 +2602,9 @@ TEST_F(PictureLayerImplTest, HighResTilingDuringAnimationForGpuRasterization) {
static_cast<FakePicturePileImpl*>(pending_layer_->pile())->set_has_text(true);
static_cast<FakePicturePileImpl*>(active_layer_->pile())->set_has_text(true);
- // Since we're GPU-rasterizing but have text, starting an animation should
- // cause tiling resolution to get set to the maximum animation scale.
+ // When we're GPU-rasterizing, even if we have text, starting an animation
+ // should cause tiling resolution to get set to the content scale, since we
+ // render animating text at content scale using distance fields.
animating_transform = true;
contents_scale = 2.f;
maximum_animation_scale = 3.f;
@@ -2613,10 +2614,10 @@ TEST_F(PictureLayerImplTest, HighResTilingDuringAnimationForGpuRasterization) {
page_scale,
maximum_animation_scale,
animating_transform);
- EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 3.f);
+ EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 2.f);
- // Further changes to scale during the animation should not cause a new
- // high-res tiling to get created.
+ // Further changes to scale during the animation should still cause a new
+ // high-res tiling to get created at content scale.
contents_scale = 4.f;
maximum_animation_scale = 5.f;
@@ -2625,7 +2626,7 @@ TEST_F(PictureLayerImplTest, HighResTilingDuringAnimationForGpuRasterization) {
page_scale,
maximum_animation_scale,
animating_transform);
- EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 3.f);
+ EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 4.f);
// Once we stop animating, a new high-res tiling should be created.
animating_transform = false;
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/layers/tiled_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698