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

Unified Diff: cc/layers/picture_image_layer_impl_unittest.cc

Issue 1565783002: Revert of Determine a layer's IsAffectedByPageScale property without using Layer Tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/layer_impl.cc ('k') | cc/layers/picture_layer_impl_unittest.cc » ('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 53b0061b05ca85f4aafd45a2d3fceda8c72db687..92e6926852aec2b17a72d6a4d8411b5bd1a34d77 100644
--- a/cc/layers/picture_image_layer_impl_unittest.cc
+++ b/cc/layers/picture_image_layer_impl_unittest.cc
@@ -108,14 +108,10 @@
scoped_ptr<TestablePictureImageLayerImpl> layer(CreateLayer(1, PENDING_TREE));
layer->SetDrawsContent(true);
- TestablePictureImageLayerImpl* layer_ptr = layer.get();
- host_impl_.pending_tree()->SetRootLayer(std::move(layer));
- host_impl_.pending_tree()->BuildPropertyTreesForTesting();
-
gfx::Rect viewport(100, 200);
- SetupDrawPropertiesAndUpdateTiles(layer_ptr, 2.f, 3.f, 4.f, 1.f, false,
- viewport);
- EXPECT_FLOAT_EQ(1.f, layer_ptr->MaximumTilingContentsScale());
+ SetupDrawPropertiesAndUpdateTiles(
+ layer.get(), 2.f, 3.f, 4.f, 1.f, false, viewport);
+ EXPECT_FLOAT_EQ(1.f, layer->MaximumTilingContentsScale());
}
TEST_F(PictureImageLayerImplTest, IgnoreIdealContentScale) {
@@ -125,10 +121,6 @@
gfx::Rect viewport(100, 200);
- TestablePictureImageLayerImpl* pending_layer_ptr = pending_layer.get();
- host_impl_.pending_tree()->SetRootLayer(std::move(pending_layer));
- host_impl_.pending_tree()->BuildPropertyTreesForTesting();
-
// Set PictureLayerImpl::ideal_contents_scale_ to 2.f which is not equal
// to the content scale used by PictureImageLayerImpl.
const float suggested_ideal_contents_scale = 2.f;
@@ -136,13 +128,17 @@
const float page_scale_factor = 4.f;
const float maximum_animation_contents_scale = 1.f;
const bool animating_transform_to_screen = false;
- SetupDrawPropertiesAndUpdateTiles(
- pending_layer_ptr, suggested_ideal_contents_scale, device_scale_factor,
- page_scale_factor, maximum_animation_contents_scale,
- animating_transform_to_screen, viewport);
- EXPECT_EQ(1.f, pending_layer_ptr->tilings()->tiling_at(0)->contents_scale());
+ SetupDrawPropertiesAndUpdateTiles(pending_layer.get(),
+ suggested_ideal_contents_scale,
+ device_scale_factor,
+ page_scale_factor,
+ maximum_animation_contents_scale,
+ animating_transform_to_screen,
+ viewport);
+ EXPECT_EQ(1.f, pending_layer->tilings()->tiling_at(0)->contents_scale());
// Push to active layer.
+ host_impl_.pending_tree()->SetRootLayer(std::move(pending_layer));
host_impl_.ActivateSyncTree();
TestablePictureImageLayerImpl* active_layer =
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698