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

Unified Diff: cc/layer_tree_host_impl.cc

Issue 11365238: cc: Return whether any layer was scrolled from InputHandlerClient::scrollBy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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_impl.h ('k') | cc/layer_tree_host_impl_unittest.cc » ('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 01afc00f5ce1147c2ee63b3574c2a64fc0d37e54..680cf4beafd760f9ea91cb55c763c78083a0c1b7 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -1145,11 +1145,12 @@ static gfx::Vector2dF scrollLayerWithLocalDelta(LayerImpl& layerImpl, gfx::Vecto
return layerImpl.scrollDelta() - previousDelta;
}
-void LayerTreeHostImpl::scrollBy(gfx::Point viewportPoint, gfx::Vector2d scrollDelta)
+bool LayerTreeHostImpl::scrollBy(const gfx::Point& viewportPoint,
+ const gfx::Vector2d& scrollDelta)
{
TRACE_EVENT0("cc", "LayerTreeHostImpl::scrollBy");
if (!m_currentlyScrollingLayerImpl)
- return;
+ return false;
gfx::Vector2dF pendingDelta = scrollDelta;
@@ -1190,7 +1191,9 @@ void LayerTreeHostImpl::scrollBy(gfx::Point viewportPoint, gfx::Vector2d scrollD
if (!scrollDelta.IsZero() && gfx::ToFlooredVector2d(pendingDelta).IsZero()) {
m_client->setNeedsCommitOnImplThread();
m_client->setNeedsRedrawOnImplThread();
+ return true;
}
+ return false;
}
void LayerTreeHostImpl::clearCurrentlyScrollingLayer()
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698