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

Unified Diff: cc/layer_tree_host_impl.cc

Issue 12082012: Implement desktop compatibility viewport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@aelias
Patch Set: Created 7 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/layer_tree_host_common.cc ('k') | cc/layer_tree_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_impl.cc
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index 9fa90e1df1a39ed29c00a87b130f75bcb3a52989..11a4979e653a53e0b4870e265161ba136b454d63 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -807,6 +807,8 @@ void LayerTreeHostImpl::drawLayers(FrameData& frame)
if (m_activeTree->hud_layer())
m_activeTree->hud_layer()->updateHudTexture(m_resourceProvider.get());
+ m_activeTree->UpdateFixedPositionViewport();
+
m_renderer->drawFrame(frame.renderPasses);
// The render passes should be consumed by the renderer.
DCHECK(frame.renderPasses.empty());
@@ -1482,6 +1484,10 @@ scoped_ptr<ScrollAndScaleSet> LayerTreeHostImpl::processScrollDeltas()
collectScrollDeltas(scrollInfo.get(), rootLayer());
scrollInfo->pageScaleDelta = m_pinchZoomViewport.page_scale_delta();
m_pinchZoomViewport.set_sent_page_scale_delta(scrollInfo->pageScaleDelta);
+ if (rootScrollLayer()) {
+ scrollInfo->desktopCompatibilityViewportOffsetFromScrollPositionDelta = gfx::ToFlooredVector2d(rootScrollLayer()->desktopCompatibilityViewportOffsetFromScrollPositionDelta());
+ rootScrollLayer()->setSentDesktopCompatibilityViewportOffsetFromScrollPositionDelta(scrollInfo->desktopCompatibilityViewportOffsetFromScrollPositionDelta);
+ }
return scrollInfo.Pass();
}
« no previous file with comments | « cc/layer_tree_host_common.cc ('k') | cc/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698