Chromium Code Reviews| Index: cc/trees/layer_tree_host_impl.cc |
| diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
| index 21018cda889305f1ac26b69ff19bc7e4c29f63db..bd2ee2df0b6480380c211a76ff01e3c7e686b0da 100644 |
| --- a/cc/trees/layer_tree_host_impl.cc |
| +++ b/cc/trees/layer_tree_host_impl.cc |
| @@ -1275,8 +1275,8 @@ void LayerTreeHostImpl::SetNeedsRedrawRect(const gfx::Rect& damage_rect) { |
| client_->SetNeedsRedrawRectOnImplThread(damage_rect); |
| } |
| -void LayerTreeHostImpl::BeginImplFrame(const BeginFrameArgs& args) { |
| - client_->BeginImplFrame(args); |
| +void LayerTreeHostImpl::BeginFrame(const BeginFrameArgs& args) { |
| + client_->BeginFrame(args); |
| } |
| void LayerTreeHostImpl::DidSwapBuffers() { |
| @@ -1477,9 +1477,15 @@ bool LayerTreeHostImpl::SwapBuffers(const LayerTreeHostImpl::FrameData& frame) { |
| return true; |
| } |
| -void LayerTreeHostImpl::SetNeedsBeginImplFrame(bool enable) { |
| +void LayerTreeHostImpl::SetNeedsBeginFrame(bool enable) { |
| if (output_surface_) |
| - output_surface_->SetNeedsBeginImplFrame(enable); |
| + output_surface_->SetNeedsBeginFrame(enable); |
| +} |
| + |
| +void LayerTreeHostImpl::WillBeginImplFrame(const BeginFrameArgs& args) { |
| + // Sample the frame time now. This time will be used for updating animations |
| + // when we draw. |
|
Sami
2014/04/03 15:55:58
Neat!
|
| + UpdateCurrentFrameTime(); |
| } |
| gfx::SizeF LayerTreeHostImpl::ComputeInnerViewportContainerSize() const { |
| @@ -1840,14 +1846,14 @@ bool LayerTreeHostImpl::InitializeRenderer( |
| GetRendererCapabilities().allow_rasterize_on_demand); |
| } |
| - // Setup BeginImplFrameEmulation if it's not supported natively |
| + // Setup BeginFrameEmulation if it's not supported natively |
| if (!settings_.begin_impl_frame_scheduling_enabled) { |
| const base::TimeDelta display_refresh_interval = |
| base::TimeDelta::FromMicroseconds( |
| base::Time::kMicrosecondsPerSecond / |
| settings_.refresh_rate); |
| - output_surface->InitializeBeginImplFrameEmulation( |
| + output_surface->InitializeBeginFrameEmulation( |
| proxy_->ImplThreadTaskRunner(), |
| settings_.throttle_frame_production, |
| display_refresh_interval); |