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

Unified Diff: trunk/src/cc/trees/thread_proxy.cc

Issue 23702010: Revert 220418 "cc: Block commit on activate by setting a flag on..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 4 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 | « trunk/src/cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/cc/trees/thread_proxy.cc
===================================================================
--- trunk/src/cc/trees/thread_proxy.cc (revision 220454)
+++ trunk/src/cc/trees/thread_proxy.cc (working copy)
@@ -76,8 +76,6 @@
textures_acquired_(true),
in_composite_and_readback_(false),
manage_tiles_pending_(false),
- commit_waits_for_activation_(false),
- inside_commit_(false),
weak_factory_on_impl_thread_(this),
weak_factory_(this),
begin_frame_sent_to_main_thread_completion_event_on_impl_thread_(NULL),
@@ -504,12 +502,6 @@
damage_rect));
}
-void ThreadProxy::SetNextCommitWaitsForActivation() {
- DCHECK(IsMainThread());
- DCHECK(!inside_commit_);
- commit_waits_for_activation_ = true;
-}
-
void ThreadProxy::SetDeferCommits(bool defer_commits) {
DCHECK(IsMainThread());
DCHECK_NE(defer_commits_, defer_commits);
@@ -937,12 +929,10 @@
current_resource_update_controller_on_impl_thread_->Finalize();
current_resource_update_controller_on_impl_thread_.reset();
- inside_commit_ = true;
layer_tree_host_impl_->BeginCommit();
layer_tree_host_->BeginCommitOnImplThread(layer_tree_host_impl_.get());
layer_tree_host_->FinishCommitOnImplThread(layer_tree_host_impl_.get());
layer_tree_host_impl_->CommitComplete();
- inside_commit_ = false;
SetInputThrottledUntilCommitOnImplThread(false);
@@ -952,7 +942,8 @@
next_frame_is_newly_committed_frame_on_impl_thread_ = true;
if (layer_tree_host_->settings().impl_side_painting &&
- commit_waits_for_activation_) {
+ layer_tree_host_->BlocksPendingCommit() &&
+ layer_tree_host_impl_->pending_tree()) {
// For some layer types in impl-side painting, the commit is held until
// the pending tree is activated. It's also possible that the
// pending tree has already activated if there was no work to be done.
@@ -965,8 +956,6 @@
commit_completion_event_on_impl_thread_ = NULL;
}
- commit_waits_for_activation_ = false;
-
commit_complete_time_ = base::TimeTicks::HighResNow();
begin_frame_to_commit_duration_history_.InsertSample(
commit_complete_time_ - begin_frame_sent_to_main_thread_time_);
« no previous file with comments | « trunk/src/cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698