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