diff options
author | enne <enne@chromium.org> | 2015-05-26 15:23:11 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-26 22:23:46 +0000 |
commit | 6394d5b43b6327ff5ebcd17a41ad0919a390a406 (patch) | |
tree | 54fcac323b3aff34fd5ba7089673d69e1efd05cb /cc/trees/layer_tree_impl_unittest.cc | |
parent | 61d79b987a2337851520e25a8cd80f2f8859aece (diff) | |
download | chromium_src-6394d5b43b6327ff5ebcd17a41ad0919a390a406.zip chromium_src-6394d5b43b6327ff5ebcd17a41ad0919a390a406.tar.gz chromium_src-6394d5b43b6327ff5ebcd17a41ad0919a390a406.tar.bz2 |
cc: Apply page scale to page scale layer
Currently, page scale is applied to children of the page scale layer but
not to the page scale layer itself. This makes it cumbersome to update
property trees during pinch zoom on the compositor thread, because the
property tree needs to be searched for any nodes that use the page scale
layer's node as a source node. In practice, from Blink, the page scale
layer only has one child, but it's a layering violation to assume this.
So, apply page scale to the target transform for the page scale layer
itself. This shouldn't have any effect in practice, as the page
scale layer doesn't usually have content.
Also, clean up language that refers to both "page scale layer" and
"page scale application layer". In CDP, these are the same thing,
but in property tree land one is the parent and one is the child.
Now there is only "page scale layer", which gets the page scale
applied on it and to its children.
This passes cc unit tests with main thread property tree verification
manually hacked back on.
R=ajuma@chromium.org, vollick@chromium.org, jdduke@chromium.org
BUG=481585
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1144103003
Cr-Commit-Position: refs/heads/master@{#331451}
Diffstat (limited to 'cc/trees/layer_tree_impl_unittest.cc')
-rw-r--r-- | cc/trees/layer_tree_impl_unittest.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cc/trees/layer_tree_impl_unittest.cc b/cc/trees/layer_tree_impl_unittest.cc index 04c108f..11ce4bc 100644 --- a/cc/trees/layer_tree_impl_unittest.cc +++ b/cc/trees/layer_tree_impl_unittest.cc @@ -2127,11 +2127,11 @@ TEST_F(LayerTreeImplTest, SelectionBoundsForScaledLayers) { host_impl().active_tree()->GetViewportSelection(&output); EXPECT_EQ(input.start.type, output.start.type); gfx::PointF expected_output_start_top = input.start.edge_top; - gfx::PointF expected_output_edge_botom = input.start.edge_bottom; + gfx::PointF expected_output_edge_bottom = input.start.edge_bottom; expected_output_start_top.Scale(page_scale_factor); - expected_output_edge_botom.Scale(page_scale_factor); - EXPECT_EQ(input.start.edge_top, output.start.edge_top); - EXPECT_EQ(input.start.edge_bottom, output.start.edge_bottom); + expected_output_edge_bottom.Scale(page_scale_factor); + EXPECT_EQ(expected_output_start_top, output.start.edge_top); + EXPECT_EQ(expected_output_edge_bottom, output.start.edge_bottom); EXPECT_TRUE(output.start.visible); EXPECT_EQ(input.end.type, output.end.type); |