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

Unified Diff: cc/animation/scrollbar_animation_controller_thinning.h

Issue 26880010: gfx: Add FrameTime and DisplayTime classes (Closed) Base URL: http://git.chromium.org/chromium/src.git@checkHighResNow4
Patch Set: WIP Created 7 years, 2 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/animation/scrollbar_animation_controller_thinning.h
diff --git a/cc/animation/scrollbar_animation_controller_thinning.h b/cc/animation/scrollbar_animation_controller_thinning.h
index 80387453697412f45d587d2b721fa8828bc0480e..0dd74c71d43d029950d47734258fef09ea1c33f7 100644
--- a/cc/animation/scrollbar_animation_controller_thinning.h
+++ b/cc/animation/scrollbar_animation_controller_thinning.h
@@ -32,14 +32,16 @@ class CC_EXPORT ScrollbarAnimationControllerThinning
// ScrollbarAnimationController overrides.
virtual bool IsAnimating() const OVERRIDE;
- virtual base::TimeDelta DelayBeforeStart(base::TimeTicks now) const OVERRIDE;
+ virtual base::TimeDelta DelayBeforeStart(gfx::FrameTime now) const
+ OVERRIDE;
- virtual bool Animate(base::TimeTicks now) OVERRIDE;
+ virtual bool Animate(gfx::FrameTime now) OVERRIDE;
virtual void DidScrollGestureBegin() OVERRIDE;
- virtual void DidScrollGestureEnd(base::TimeTicks now) OVERRIDE;
- virtual void DidMouseMoveOffScrollbar(base::TimeTicks now) OVERRIDE;
- virtual bool DidScrollUpdate(base::TimeTicks now) OVERRIDE;
- virtual bool DidMouseMoveNear(base::TimeTicks now, float distance) OVERRIDE;
+ virtual void DidScrollGestureEnd(gfx::FrameTime now) OVERRIDE;
+ virtual void DidMouseMoveOffScrollbar(gfx::FrameTime now) OVERRIDE;
+ virtual bool DidScrollUpdate(gfx::FrameTime now) OVERRIDE;
+ virtual bool DidMouseMoveNear(gfx::FrameTime now, float distance)
+ OVERRIDE;
protected:
ScrollbarAnimationControllerThinning(LayerImpl* scroll_layer,
@@ -49,7 +51,7 @@ class CC_EXPORT ScrollbarAnimationControllerThinning
private:
// Returns how far through the animation we are as a progress value from
// 0 to 1.
- float AnimationProgressAtTime(base::TimeTicks now);
+ float AnimationProgressAtTime(gfx::FrameTime now);
float OpacityAtAnimationProgress(float progress);
float ThumbThicknessScaleAtAnimationProgress(float progress);
void ApplyOpacityAndThumbThicknessScale(float opacity,
@@ -57,7 +59,7 @@ class CC_EXPORT ScrollbarAnimationControllerThinning
LayerImpl* scroll_layer_;
- base::TimeTicks last_awaken_time_;
+ gfx::FrameTime last_awaken_time_;
bool scroll_gesture_in_progress_;
bool mouse_is_over_scrollbar_;

Powered by Google App Engine
This is Rietveld 408576698