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_); |