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

Unified Diff: cc/trees/single_thread_proxy.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/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index 117af5d4b93001c375eaa21a476cd59d6795c44a..855d980d757ee2b945bd904ee522bae62cab1af6 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -45,9 +45,7 @@
client_(client),
timing_history_(layer_tree_host->rendering_stats_instrumentation()),
next_frame_is_newly_committed_frame_(false),
-#if DCHECK_IS_ON()
inside_impl_frame_(false),
-#endif
inside_draw_(false),
defer_commits_(false),
animate_requested_(false),
@@ -589,9 +587,7 @@
void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) {
TRACE_EVENT0("cc,benchmark", "SingleThreadProxy::CompositeImmediately");
DCHECK(Proxy::IsMainThread());
-#if DCHECK_IS_ON()
DCHECK(!inside_impl_frame_);
-#endif
base::AutoReset<bool> inside_composite(&inside_synchronous_composite_, true);
if (layer_tree_host_->output_surface_lost()) {
@@ -614,9 +610,7 @@
// Run the "main thread" and get it to commit.
{
-#if DCHECK_IS_ON()
DCHECK(inside_impl_frame_);
-#endif
DoBeginMainFrame(begin_frame_args);
DoCommit();
@@ -645,7 +639,7 @@
layer_tree_host_impl_->active_tree()->BreakSwapPromises(
SwapPromise::SWAP_FAILS);
- DidFinishImplFrame();
+ DidBeginImplFrameDeadline();
}
}
@@ -804,11 +798,9 @@
}
void SingleThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) {
-#if DCHECK_IS_ON()
DCHECK(!inside_impl_frame_)
<< "WillBeginImplFrame called while already inside an impl frame!";
inside_impl_frame_ = true;
-#endif
layer_tree_host_impl_->WillBeginImplFrame(args);
}
@@ -821,10 +813,8 @@
// fall on the next. Doing it asynchronously instead matches the semantics of
// ThreadProxy::SetNeedsCommit where SetNeedsCommit will not cause a
// synchronous commit.
-#if DCHECK_IS_ON()
DCHECK(inside_impl_frame_)
<< "BeginMainFrame should only be sent inside a BeginImplFrame";
-#endif
const BeginFrameArgs& begin_frame_args =
layer_tree_host_impl_->CurrentBeginFrameArgs();
@@ -988,13 +978,11 @@
return timing_history_.CommitToActivateDurationEstimate();
}
-void SingleThreadProxy::DidFinishImplFrame() {
- layer_tree_host_impl_->DidFinishImplFrame();
-#if DCHECK_IS_ON()
+void SingleThreadProxy::DidBeginImplFrameDeadline() {
+ layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame();
DCHECK(inside_impl_frame_)
<< "DidBeginImplFrameDeadline called while not inside an impl frame!";
inside_impl_frame_ = false;
-#endif
}
void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) {
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698