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 eea6236ab6280627eba8b0e6a3e251c90781b26d..1c602b9b944708a3d63a9f83262bc2814f1f16b0 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -1671,12 +1671,7 @@ |
void LayerTreeHostImpl::WillBeginImplFrame(const BeginFrameArgs& args) { |
// Sample the frame time now. This time will be used for updating animations |
// when we draw. |
- 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(); |
- |
+ UpdateCurrentBeginFrameArgs(args); |
// Cache the begin impl frame interval |
begin_impl_frame_interval_ = args.interval; |
@@ -1689,11 +1684,6 @@ |
for (auto& it : video_frame_controllers_) |
it->OnBeginFrame(args); |
-} |
- |
-void LayerTreeHostImpl::DidFinishImplFrame() { |
- DCHECK(current_begin_frame_args_.IsValid()); |
- current_begin_frame_args_ = BeginFrameArgs(); |
} |
void LayerTreeHostImpl::UpdateViewportContainerSizes() { |
@@ -3143,6 +3133,19 @@ |
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 |