Index: Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp |
=================================================================== |
--- Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp (revision 122256) |
+++ Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp (working copy) |
@@ -299,15 +299,6 @@ |
bool CCLayerTreeHost::compositeAndReadback(void *pixels, const IntRect& rect) |
{ |
- if (!m_layerRendererInitialized) { |
- initializeLayerRenderer(); |
- if (!m_layerRendererInitialized) |
- return false; |
- } |
- if (m_contextLost) { |
- if (recreateContext() != RecreateSucceeded) |
- return false; |
- } |
m_triggerIdlePaints = false; |
bool ret = m_proxy->compositeAndReadback(pixels, rect); |
m_triggerIdlePaints = true; |
@@ -466,7 +457,7 @@ |
m_client->scheduleComposite(); |
} |
-bool CCLayerTreeHost::updateLayers(CCTextureUpdater& updater) |
+bool CCLayerTreeHost::initializeLayerRendererIfNeeded() |
{ |
if (!m_layerRendererInitialized) { |
initializeLayerRenderer(); |
@@ -478,7 +469,13 @@ |
if (recreateContext() != RecreateSucceeded) |
return false; |
} |
+ return true; |
+} |
+ |
+void CCLayerTreeHost::updateLayers(CCTextureUpdater& updater) |
+{ |
+ ASSERT(m_layerRendererInitialized); |
// The visible state and memory allocation are set independently and in |
// arbitrary order, so do not change the memory allocation used for the |
// current commit until both values match intentions. |
@@ -491,13 +488,12 @@ |
} |
if (!rootLayer()) |
- return true; |
+ return; |
if (viewportSize().isEmpty()) |
- return true; |
+ return; |
updateLayers(rootLayer(), updater); |
- return true; |
} |
void CCLayerTreeHost::updateLayers(LayerChromium* rootLayer, CCTextureUpdater& updater) |