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

Unified Diff: cc/layer_tree_host_impl.cc

Issue 11550035: Implement pinch-zoom scaling for main-frame scrollbars and pinch-zoom overlay scrollbars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix impl-side painting issues. Created 7 years, 10 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
Index: cc/layer_tree_host_impl.cc
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index 7f7df10798a7a2191f3b1c73daf947e8400a353c..957c1cea8f26752a2ca3c726364bffc191bb16a2 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -444,6 +444,11 @@ bool LayerTreeHostImpl::calculateRenderPasses(FrameData& frame)
if (!canDraw() || !rootLayer())
return false;
+ // Set the opacity of the pinch zoom scrollbars. This is done here
+ // so that it comes after the commit and we can directly set the
+ // opacity on the impl scrollbar layers.
+ activeTree()->SetPinchZoomScrollbarsVisibility();
jamesr 2013/02/26 20:48:46 Why is this different for the pinch zoom scrollbar
wjmaclean 2013/03/01 15:30:32 Because I had thought in the initial CL we would d
+
trackDamageForAllSurfaces(rootLayer(), *frame.renderSurfaceLayerList);
TRACE_EVENT1("cc", "LayerTreeHostImpl::calculateRenderPasses", "renderSurfaceLayerList.size()", static_cast<long long unsigned>(frame.renderSurfaceLayerList->size()));
@@ -1353,6 +1358,7 @@ bool LayerTreeHostImpl::scrollBy(const gfx::Point& viewportPoint,
}
if (didScroll) {
+ activeTree()->UpdatePinchZoomScrollbarsIfNeeded();
m_client->setNeedsCommitOnImplThread();
m_client->setNeedsRedrawOnImplThread();
m_client->renewTreePriority();
@@ -1371,6 +1377,8 @@ void LayerTreeHostImpl::scrollEnd()
if (m_topControlsManager)
m_topControlsManager->ScrollEnd();
clearCurrentlyScrollingLayer();
+ if (activeTree()->HasPinchZoomScrollbars())
+ m_client->setNeedsRedrawOnImplThread();
}
void LayerTreeHostImpl::pinchGestureBegin()

Powered by Google App Engine
This is Rietveld 408576698