Chromium Code Reviews| Index: cc/thread_proxy.cc |
| diff --git a/cc/thread_proxy.cc b/cc/thread_proxy.cc |
| index b2f86c938124d4815c4ec7a7cd0714d938ba4223..a3c44ae269789e63d3ec981df6add49d42689819 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_EVENT0("cc", "ThreadProxy::scheduledActionCommit_HoldCommit"); |
|
nduca
2013/01/08 04:49:27
You can just write HoldCommitUntilActivate and use
|
| + } |
| + 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_EVENT0("cc", "ThreadProxy::scheduledActionDrawAndSwapInternal_ReleaseCommit"); |
| + DCHECK(m_layerTreeHostImpl->settings().implSidePainting); |
| + m_commitCompletionEventOnImplThread->signal(); |
| + m_commitCompletionEventOnImplThread = 0; |
| + } |
| + |
| // Check for a pending compositeAndReadback. |
| if (m_readbackRequestOnImplThread) { |
| m_readbackRequestOnImplThread->success = false; |