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

Unified Diff: ui/compositor/layer_animation_element.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
« no previous file with comments | « ui/compositor/compositor_observer.h ('k') | ui/compositor/layer_animation_element.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_animation_element.h
diff --git a/ui/compositor/layer_animation_element.h b/ui/compositor/layer_animation_element.h
index 1127424087fc015f0a1903a9839d422fb4c3d0e6..5e4cc783e003a1ae7e1c713b8dceb911bfebcc59 100644
--- a/ui/compositor/layer_animation_element.h
+++ b/ui/compositor/layer_animation_element.h
@@ -14,6 +14,7 @@
#include "third_party/skia/include/core/SkColor.h"
#include "ui/compositor/compositor_export.h"
#include "ui/gfx/animation/tween.h"
+#include "ui/gfx/frame_time.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/transform.h"
@@ -136,17 +137,17 @@ class COMPOSITOR_EXPORT LayerAnimationElement {
// Sets the start time for the animation. This must be called before the first
// call to {Start, IsFinished}. Once the animation is finished, this must
// be called again in order to restart the animation.
- void set_requested_start_time(base::TimeTicks start_time) {
+ void set_requested_start_time(gfx::FrameTime start_time) {
requested_start_time_ = start_time;
}
- base::TimeTicks requested_start_time() const { return requested_start_time_; }
+ gfx::FrameTime requested_start_time() const { return requested_start_time_; }
// Sets the actual start time for the animation, taking into account any
// queueing delays.
- void set_effective_start_time(base::TimeTicks start_time) {
+ void set_effective_start_time(gfx::FrameTime start_time) {
effective_start_time_ = start_time;
}
- base::TimeTicks effective_start_time() const { return effective_start_time_; }
+ gfx::FrameTime effective_start_time() const { return effective_start_time_; }
// This must be called before the first call to Progress. If starting the
// animation involves dispatching to another thread, then this will proceed
@@ -159,12 +160,12 @@ class COMPOSITOR_EXPORT LayerAnimationElement {
// Updates the delegate to the appropriate value for |now|. Returns true
// if a redraw is required.
- bool Progress(base::TimeTicks now, LayerAnimationDelegate* delegate);
+ bool Progress(gfx::FrameTime now, LayerAnimationDelegate* delegate);
// If calling Progress now, with the given time, will finish the animation,
// returns true and sets |end_duration| to the actual duration for this
// animation, incuding any queueing delays.
- bool IsFinished(base::TimeTicks time, base::TimeDelta* total_duration);
+ bool IsFinished(gfx::FrameTime time, base::TimeDelta* total_duration);
// Updates the delegate to the end of the animation. Returns true if a
// redraw is required.
@@ -220,10 +221,10 @@ class COMPOSITOR_EXPORT LayerAnimationElement {
bool first_frame_;
const AnimatableProperties properties_;
- base::TimeTicks requested_start_time_;
+ gfx::FrameTime requested_start_time_;
// When the animation actually started, taking into account queueing delays.
- base::TimeTicks effective_start_time_;
+ gfx::FrameTime effective_start_time_;
const base::TimeDelta duration_;
gfx::Tween::Type tween_type_;
« no previous file with comments | « ui/compositor/compositor_observer.h ('k') | ui/compositor/layer_animation_element.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698