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

Unified Diff: cc/trees/thread_proxy.cc

Issue 23694031: Fix race conditions in window snapshot code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index dda25ecb79ad4b24337fa6a00cda38c3bbd4b5e6..104380be2166b76b12d95d15e914dca3dd7ef782 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -514,6 +514,15 @@ void ThreadProxy::SetNextCommitWaitsForActivation() {
commit_waits_for_activation_ = true;
}
+void ThreadProxy::SetNextCommitForcesRedraw() {
enne (OOO) 2013/09/11 17:42:43 This isn't going to work. This function is "SetNe
+ DCHECK(IsMainThread());
+ DCHECK(!inside_commit_);
+ Proxy::ImplThreadTaskRunner()->PostTask(
+ FROM_HERE,
+ base::Bind(&ThreadProxy::SetFullRootLayerDamageOnImplThread,
+ impl_thread_weak_ptr_));
+}
+
void ThreadProxy::SetDeferCommits(bool defer_commits) {
DCHECK(IsMainThread());
DCHECK_NE(defer_commits_, defer_commits);
@@ -592,6 +601,12 @@ void ThreadProxy::SetInputThrottledUntilCommitOnImplThread(
RenewTreePriority();
}
+void ThreadProxy::SetFullRootLayerDamageOnImplThread() {
+ DCHECK(IsImplThread());
+ layer_tree_host_impl_->SetFullRootLayerDamage();
+ LOG(INFO) << "ThreadProxy::SetFullRootLayerDamageOnImplThread";
+}
+
void ThreadProxy::Start(scoped_ptr<OutputSurface> first_output_surface) {
DCHECK(IsMainThread());
DCHECK(Proxy::HasImplThread());
@@ -713,6 +728,7 @@ void ThreadProxy::BeginFrameOnMainThread(
return;
if (defer_commits_) {
+ LOG(INFO) << "EarlyOut_DeferCommits";
pending_deferred_commit_ = begin_frame_state.Pass();
layer_tree_host_->DidDeferCommit();
TRACE_EVENT0("cc", "EarlyOut_DeferCommits");
@@ -736,6 +752,7 @@ void ThreadProxy::BeginFrameOnMainThread(
commit_requested_ = false;
commit_request_sent_to_impl_thread_ = false;
+ LOG(INFO) << "EarlyOut_NotVisible";
TRACE_EVENT0("cc", "EarlyOut_NotVisible");
bool did_handle = false;
Proxy::ImplThreadTaskRunner()->PostTask(
@@ -790,6 +807,7 @@ void ThreadProxy::BeginFrameOnMainThread(
layer_tree_host_->WillCommit();
if (!updated && can_cancel_this_commit) {
+ LOG(INFO) << "EarlyOut_NoUpdates";
TRACE_EVENT0("cc", "EarlyOut_NoUpdates");
bool did_handle = true;
Proxy::ImplThreadTaskRunner()->PostTask(
@@ -876,6 +894,7 @@ void ThreadProxy::StartCommitOnImplThread(
DCHECK(scheduler_on_impl_thread_->CommitPending());
if (!layer_tree_host_impl_) {
+ LOG(INFO) << "EarlyOut_NoLayerTree";
TRACE_EVENT0("cc", "EarlyOut_NoLayerTree");
completion->Signal();
return;

Powered by Google App Engine
This is Rietveld 408576698