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

Unified Diff: cc/trees/layer_tree_host_impl.h

Issue 361143002: Impl thread smooth scrolling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better way to detect animation finished. Created 6 years, 5 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/trees/layer_tree_host_impl.h
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index fe9afc219e6dd30caa9cd94e0c1a3d78f67cf0f2..e5412bbe005b09b1a1c75f0811b834d60204e5f6 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -126,6 +126,9 @@ class CC_EXPORT LayerTreeHostImpl
virtual InputHandler::ScrollStatus ScrollBegin(
const gfx::Point& viewport_point,
InputHandler::ScrollInputType type) OVERRIDE;
+ virtual InputHandler::ScrollStatus ScrollAnimated(
+ const gfx::Point& viewport_point,
+ const gfx::Vector2dF& scroll_delta) OVERRIDE;
virtual bool ScrollBy(const gfx::Point& viewport_point,
const gfx::Vector2dF& scroll_delta) OVERRIDE;
virtual bool ScrollVerticallyByPage(const gfx::Point& viewport_point,
@@ -552,6 +555,14 @@ class CC_EXPORT LayerTreeHostImpl
void NotifySwapPromiseMonitorsOfSetNeedsRedraw();
+ class IsScrollOffsetAnimationFinished {
+ public:
+ bool operator()(const AnimationEvent& event) const {
+ return event.type == AnimationEvent::Finished &&
+ event.target_property == Animation::ScrollOffset;
+ }
+ };
+
typedef base::hash_map<UIResourceId, UIResourceData>
UIResourceMap;
UIResourceMap ui_resource_map_;

Powered by Google App Engine
This is Rietveld 408576698