Index: Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp |
=================================================================== |
--- Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp (revision 122257) |
+++ Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp (working copy) |
@@ -152,6 +152,12 @@ |
// Scheduling is controlled by the embedder in the single thread case, so nothing to do. |
} |
+void CCSingleThreadProxy::setVisible(bool visible) |
+{ |
+ DebugScopedSetImplThread impl; |
+ m_layerTreeHostImpl->setVisible(visible); |
+} |
+ |
bool CCSingleThreadProxy::initializeLayerRenderer() |
{ |
ASSERT(CCProxy::isMainThread()); |
@@ -257,12 +263,6 @@ |
m_layerTreeHost->scheduleComposite(); |
} |
-void CCSingleThreadProxy::setNeedsForcedCommit() |
-{ |
- // This proxy doesn't block commits when not visible so use a normal commit. |
- setNeedsCommit(); |
-} |
- |
void CCSingleThreadProxy::setNeedsRedraw() |
{ |
// FIXME: Once we move render_widget scheduling into this class, we can |
@@ -289,7 +289,8 @@ |
DebugScopedSetMainThreadBlocked mainThreadBlocked; |
DebugScopedSetImplThread impl; |
- m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->contentsTextureAllocator()); |
+ if (!m_layerTreeHostImpl->contentsTexturesWerePurgedSinceLastCommit()) |
+ m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->contentsTextureAllocator()); |
m_layerTreeHostImpl.clear(); |
} |
m_layerTreeHost = 0; |
@@ -309,14 +310,6 @@ |
m_layerTreeHost->setAnimationEvents(events, wallClockTime); |
} |
-void CCSingleThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread(size_t bytes) |
-{ |
- ASSERT(CCProxy::isImplThread()); |
- DebugScopedSetMainThread main; |
- ASSERT(m_layerTreeHost); |
- m_layerTreeHost->setContentsMemoryAllocationLimitBytes(bytes); |
-} |
- |
// Called by the legacy scheduling path (e.g. where render_widget does the scheduling) |
void CCSingleThreadProxy::compositeImmediately() |
{ |
@@ -344,11 +337,15 @@ |
{ |
ASSERT(CCProxy::isMainThread()); |
+ |
if (!m_layerTreeHost->initializeLayerRendererIfNeeded()) |
return false; |
+ if (m_layerTreeHostImpl->contentsTexturesWerePurgedSinceLastCommit()) |
+ m_layerTreeHost->evictAllContentTextures(); |
+ |
CCTextureUpdater updater; |
- m_layerTreeHost->updateLayers(updater); |
+ m_layerTreeHost->updateLayers(updater, m_layerTreeHostImpl->memoryAllocationLimitBytes()); |
m_layerTreeHost->willCommit(); |
doCommit(updater); |