Index: cc/thread_proxy.cc |
diff --git a/cc/thread_proxy.cc b/cc/thread_proxy.cc |
index 2281164263a28f51999db0dc8d1923bc5618a32b..1056fa8b49d64fa6b504c3ee95f60a412d7185eb 100644 |
--- a/cc/thread_proxy.cc |
+++ b/cc/thread_proxy.cc |
@@ -516,9 +516,6 @@ void ThreadProxy::scheduledActionBeginFrame() |
beginFrameState->implTransform = m_layerTreeHostImpl->implTransform(); |
DCHECK_GT(m_layerTreeHostImpl->memoryAllocationLimitBytes(), 0u); |
beginFrameState->memoryAllocationLimitBytes = m_layerTreeHostImpl->memoryAllocationLimitBytes(); |
- if (m_layerTreeHost->contentsTextureManager()) |
- m_layerTreeHost->contentsTextureManager()->getEvictedBackings(beginFrameState->evictedContentsTexturesBackings); |
- |
m_mainThreadProxy->postTask(FROM_HERE, base::Bind(&ThreadProxy::beginFrame, base::Unretained(this), base::Passed(beginFrameState.Pass()))); |
if (m_beginFrameCompletionEventOnImplThread) { |
@@ -534,13 +531,6 @@ void ThreadProxy::beginFrame(scoped_ptr<BeginFrameAndCommitState> beginFrameStat |
if (!m_layerTreeHost) |
return; |
- // Be sure to never early-out of unlinking evicted textures whenever, so that |
- // the each evicted backing is sent to the main thread exactly once. |
- if (beginFrameState && !beginFrameState->evictedContentsTexturesBackings.empty()) { |
- DCHECK(m_layerTreeHost->contentsTextureManager()); |
- m_layerTreeHost->contentsTextureManager()->unlinkEvictedBackings(beginFrameState->evictedContentsTexturesBackings); |
- } |
- |
if (m_deferCommits) { |
m_pendingDeferredCommit = beginFrameState.Pass(); |
m_layerTreeHost->didDeferCommit(); |
@@ -595,6 +585,10 @@ void ThreadProxy::beginFrame(scoped_ptr<BeginFrameAndCommitState> beginFrameStat |
return; |
} |
+ // Unlink any backings that the impl thread has evicted, so that we know to re-paint |
+ // them in updateLayers. |
+ m_layerTreeHost->contentsTextureManager()->unlinkAndClearEvictedBackings(); |
+ |
scoped_ptr<ResourceUpdateQueue> queue = make_scoped_ptr(new ResourceUpdateQueue); |
m_layerTreeHost->updateLayers(*(queue.get()), beginFrameState ? beginFrameState->memoryAllocationLimitBytes : 0); |