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

Unified Diff: Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp

Issue 10690121: Merge 121076 - [chromium] LayerRendererChromium is not getting visibility messages in single thread… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 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
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);

Powered by Google App Engine
This is Rietveld 408576698