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

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

Issue 10702135: Merge 120858 - [chromium] Separate LayerRenderer initialization from updateLayers (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/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)

Powered by Google App Engine
This is Rietveld 408576698