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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h

Issue 1534813004: Run smooth scroll animations on the compositor when possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years 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: third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h
index 3503b7f1a0b5e0a8f8009496307d7a62f18c5035..5926f865208fdb2493e96fa0f026c8ac81956a0f 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h
+++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h
@@ -35,6 +35,7 @@
#include "platform/PlatformWheelEvent.h"
#include "platform/geometry/FloatSize.h"
#include "platform/heap/Handle.h"
+#include "platform/scroll/ScrollAnimatorCompositorCoordinator.h"
#include "platform/scroll/ScrollTypes.h"
#include "wtf/Forward.h"
@@ -43,8 +44,9 @@ namespace blink {
class FloatPoint;
class ScrollableArea;
class Scrollbar;
+class WebCompositorAnimationTimeline;
-class PLATFORM_EXPORT ScrollAnimatorBase : public NoBaseWillBeGarbageCollectedFinalized<ScrollAnimatorBase> {
+class PLATFORM_EXPORT ScrollAnimatorBase : public ScrollAnimatorCompositorCoordinator {
public:
static PassOwnPtrWillBeRawPtr<ScrollAnimatorBase> create(ScrollableArea*);
@@ -61,8 +63,6 @@ public:
virtual void scrollToOffsetWithoutAnimation(const FloatPoint&);
- ScrollableArea* scrollableArea() const { return m_scrollableArea; }
-
virtual void setIsActive() { }
#if OS(MACOSX)
@@ -76,9 +76,14 @@ public:
// area.
virtual float computeDeltaToConsume(ScrollbarOrientation, float pixelDelta) const;
- virtual void cancelAnimations() { }
- virtual void serviceScrollAnimations() { }
- virtual bool hasRunningAnimation() const { return false; }
+
+ // ScrollAnimatorCompositorCoordinator implementation.
+ ScrollableArea* scrollableArea() const override { return m_scrollableArea; }
+ void tickAnimation(double monotonicTime) override { };
+ void cancelAnimation() override { }
+ void updateCompositorAnimations() override { };
+ void notifyCompositorAnimationFinished(int groupId) override { };
+ void layerForCompositedScrollingDidChange(WebCompositorAnimationTimeline*) override { };
virtual void contentAreaWillPaint() const { }
virtual void mouseEnteredContentArea() const { }

Powered by Google App Engine
This is Rietveld 408576698