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

Unified Diff: cc/trees/layer_tree_host_impl.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 | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 eda2f25d3733de1ff107eded1aa3de410c1d6f39..f6cbe0702cb9eae4983369c66e07379e4d887cea 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -158,7 +158,7 @@ class CC_EXPORT LayerTreeHostImpl
virtual void BeginCommit();
virtual void CommitComplete();
- virtual void Animate(base::TimeTicks monotonic_time,
+ virtual void Animate(gfx::FrameTime monotonic_time,
base::Time wall_clock_time);
virtual void UpdateAnimationState(bool start_ready_animations);
void MainThreadHasStoppedFlinging();
@@ -173,7 +173,7 @@ class CC_EXPORT LayerTreeHostImpl
// two.
virtual bool PrepareToDraw(FrameData* frame,
gfx::Rect device_viewport_damage_rect);
- virtual void DrawLayers(FrameData* frame, base::TimeTicks frame_begin_time);
+ virtual void DrawLayers(FrameData* frame, gfx::FrameTime frame_begin_time);
// Must be called if and only if PrepareToDraw was called.
void DidDrawAllLayers(const FrameData& frame);
@@ -381,10 +381,10 @@ class CC_EXPORT LayerTreeHostImpl
void SetTreePriority(TreePriority priority);
void ResetCurrentFrameTimeForNextFrame();
- virtual base::TimeTicks CurrentFrameTimeTicks();
+ virtual gfx::FrameTime CurrentFrameTimeTicks();
base::Time CurrentFrameTime();
- virtual base::TimeTicks CurrentPhysicalTimeTicks() const;
+ virtual gfx::FrameTime CurrentPhysicalFrameTime() const;
scoped_ptr<base::Value> AsValue() const { return AsValueWithFrame(NULL); }
scoped_ptr<base::Value> AsValueWithFrame(FrameData* frame) const;
@@ -416,7 +416,7 @@ class CC_EXPORT LayerTreeHostImpl
SharedBitmapManager* manager);
// Virtual for testing.
- virtual void AnimateLayers(base::TimeTicks monotonic_time,
+ virtual void AnimateLayers(gfx::FrameTime monotonic_time,
base::Time wall_clock_time);
// Virtual for testing.
@@ -443,9 +443,9 @@ class CC_EXPORT LayerTreeHostImpl
void ReleaseTreeResources();
void EnforceZeroBudget(bool zero_budget);
- void AnimatePageScale(base::TimeTicks monotonic_time);
- void AnimateScrollbars(base::TimeTicks monotonic_time);
- void AnimateTopControls(base::TimeTicks monotonic_time);
+ void AnimatePageScale(gfx::FrameTime monotonic_time);
+ void AnimateScrollbars(gfx::FrameTime monotonic_time);
+ void AnimateTopControls(gfx::FrameTime monotonic_time);
gfx::Vector2dF ScrollLayerWithViewportSpaceDelta(
LayerImpl* layer_impl,
@@ -473,9 +473,9 @@ class CC_EXPORT LayerTreeHostImpl
gfx::PointF device_viewport_point);
void AnimateScrollbarsRecursive(LayerImpl* layer,
- base::TimeTicks time);
+ gfx::FrameTime time);
- void UpdateCurrentFrameTime(base::TimeTicks* ticks, base::Time* now) const;
+ void UpdateCurrentFrameTime(gfx::FrameTime *ticks, base::Time* now) const;
LayerImpl* FindScrollLayerForDeviceViewportPoint(
gfx::PointF device_viewport_point,
@@ -484,7 +484,8 @@ class CC_EXPORT LayerTreeHostImpl
bool* scroll_on_main_thread) const;
float DeviceSpaceDistanceToLayer(gfx::PointF device_viewport_point,
LayerImpl* layer_impl);
- void StartScrollbarAnimationRecursive(LayerImpl* layer, base::TimeTicks time);
+ void StartScrollbarAnimationRecursive(LayerImpl* layer,
+ gfx::FrameTime time);
void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy,
bool zero_budget);
void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy);
@@ -610,7 +611,7 @@ class CC_EXPORT LayerTreeHostImpl
gfx::Rect viewport_damage_rect_;
- base::TimeTicks current_frame_timeticks_;
+ gfx::FrameTime current_frame_timeticks_;
base::Time current_frame_time_;
scoped_ptr<AnimationRegistrar> animation_registrar_;
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698