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

Unified Diff: cc/thread_proxy.cc

Issue 11710004: cc: Block the main thread for texture layers during impl-side painting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: TRACE_EVENT_INSTANT Created 7 years, 11 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/texture_layer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/thread_proxy.cc
diff --git a/cc/thread_proxy.cc b/cc/thread_proxy.cc
index b2f86c938124d4815c4ec7a7cd0714d938ba4223..3a43702fdb612755c7841d1ba02e3d35d21e0023 100644
--- a/cc/thread_proxy.cc
+++ b/cc/thread_proxy.cc
@@ -719,8 +719,17 @@ void ThreadProxy::scheduledActionCommit()
m_nextFrameIsNewlyCommittedFrameOnImplThread = true;
- m_commitCompletionEventOnImplThread->signal();
- m_commitCompletionEventOnImplThread = 0;
+ if (m_layerTreeHost->settings().implSidePainting && m_layerTreeHost->blocksPendingCommit())
+ {
+ // For some layer types in impl-side painting, the commit is held until
+ // the pending tree is activated.
+ TRACE_EVENT_INSTANT0("cc", "HoldCommit");
+ }
+ else
+ {
+ m_commitCompletionEventOnImplThread->signal();
+ m_commitCompletionEventOnImplThread = 0;
+ }
// SetVisible kicks off the next scheduler action, so this must be last.
m_schedulerOnImplThread->setVisible(m_layerTreeHostImpl->visible());
@@ -774,6 +783,15 @@ ScheduledActionDrawAndSwapResult ThreadProxy::scheduledActionDrawAndSwapInternal
}
m_layerTreeHostImpl->didDrawAllLayers(frame);
+ // Check for tree activation.
+ if (m_commitCompletionEventOnImplThread && !m_layerTreeHostImpl->pendingTree())
+ {
+ TRACE_EVENT_INSTANT0("cc", "ReleaseCommitbyActivation");
+ DCHECK(m_layerTreeHostImpl->settings().implSidePainting);
+ m_commitCompletionEventOnImplThread->signal();
+ m_commitCompletionEventOnImplThread = 0;
+ }
+
// Check for a pending compositeAndReadback.
if (m_readbackRequestOnImplThread) {
m_readbackRequestOnImplThread->success = false;
« no previous file with comments | « cc/texture_layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698