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 1c602b9b944708a3d63a9f83262bc2814f1f16b0..eea6236ab6280627eba8b0e6a3e251c90781b26d 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -1671,7 +1671,12 @@ bool LayerTreeHostImpl::SwapBuffers(const LayerTreeHostImpl::FrameData& frame) { |
void LayerTreeHostImpl::WillBeginImplFrame(const BeginFrameArgs& args) { |
// Sample the frame time now. This time will be used for updating animations |
// when we draw. |
- UpdateCurrentBeginFrameArgs(args); |
+ DCHECK(!current_begin_frame_args_.IsValid()); |
+ current_begin_frame_args_ = args; |
+ // TODO(mithro): Stop overriding the frame time once the usage of frame |
+ // timing is unified. |
+ current_begin_frame_args_.frame_time = gfx::FrameTime::Now(); |
+ |
// Cache the begin impl frame interval |
begin_impl_frame_interval_ = args.interval; |
@@ -1686,6 +1691,11 @@ void LayerTreeHostImpl::WillBeginImplFrame(const BeginFrameArgs& args) { |
it->OnBeginFrame(args); |
} |
+void LayerTreeHostImpl::DidFinishImplFrame() { |
+ DCHECK(current_begin_frame_args_.IsValid()); |
+ current_begin_frame_args_ = BeginFrameArgs(); |
+} |
+ |
void LayerTreeHostImpl::UpdateViewportContainerSizes() { |
LayerImpl* inner_container = active_tree_->InnerViewportContainerLayer(); |
LayerImpl* outer_container = active_tree_->OuterViewportContainerLayer(); |
@@ -3133,19 +3143,6 @@ TreePriority LayerTreeHostImpl::GetTreePriority() const { |
return global_tile_state_.tree_priority; |
} |
-void LayerTreeHostImpl::UpdateCurrentBeginFrameArgs( |
- const BeginFrameArgs& args) { |
- DCHECK(!current_begin_frame_args_.IsValid()); |
- current_begin_frame_args_ = args; |
- // TODO(skyostil): Stop overriding the frame time once the usage of frame |
- // timing is unified. |
- current_begin_frame_args_.frame_time = gfx::FrameTime::Now(); |
-} |
- |
-void LayerTreeHostImpl::ResetCurrentBeginFrameArgsForNextFrame() { |
- current_begin_frame_args_ = BeginFrameArgs(); |
-} |
- |
BeginFrameArgs LayerTreeHostImpl::CurrentBeginFrameArgs() const { |
// Try to use the current frame time to keep animations non-jittery. But if |
// we're not in a frame (because this is during an input event or a delayed |