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

Unified Diff: cc/layers/layer_impl.cc

Issue 664803003: Update from chromium a8e7c94b1b79a0948d05a1fcfff53391d22ce37a (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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/delegated_renderer_layer_impl_unittest.cc ('k') | cc/layers/picture_image_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 4c16da7b79bd64d457c6a895063f65578e8f1eda..29735193321f538514eb1a0ba222118501cb54e9 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -625,6 +625,13 @@ gfx::Vector2dF LayerImpl::FixedContainerSizeDelta() const {
float scale = layer_tree_impl()->page_scale_factor();
gfx::Vector2dF delta_from_scroll = scroll_clip_layer_->bounds_delta();
+
+ // In virtual-viewport mode, we don't need to compensate for pinch zoom or
+ // scale since the fixed container is the outer viewport, which sits below
+ // the page scale.
+ if (layer_tree_impl()->settings().use_pinch_virtual_viewport)
+ return delta_from_scroll;
+
delta_from_scroll.Scale(1.f / scale);
// The delta-from-pinch component requires some explanation: A viewport of
« no previous file with comments | « cc/layers/delegated_renderer_layer_impl_unittest.cc ('k') | cc/layers/picture_image_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698