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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 1127963003: Revert of cc: Adding DidFinishImplFrame to LTHI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.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.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
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698