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

Unified Diff: Source/core/inspector/InspectorLayerTreeAgent.cpp

Issue 26110004: Defer the real work in updateCompositingLayers until it's really needed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 7 years, 2 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
« no previous file with comments | « LayoutTests/http/tests/inspector/inspector-test.js ('k') | Source/core/page/Page.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorLayerTreeAgent.cpp
diff --git a/Source/core/inspector/InspectorLayerTreeAgent.cpp b/Source/core/inspector/InspectorLayerTreeAgent.cpp
index b91d04a1051f2e6bc6a8837bea0ff71f4421c2e5..2498ae681bd4d2835f7335202b8eebd2e6ba2193 100644
--- a/Source/core/inspector/InspectorLayerTreeAgent.cpp
+++ b/Source/core/inspector/InspectorLayerTreeAgent.cpp
@@ -181,6 +181,8 @@ void InspectorLayerTreeAgent::getLayers(ErrorString* errorString, const int* nod
*errorString = "Not in the compositing mode";
return;
}
+ // FIXME: when inspector layer access is made asynchronous, this will probably need to be changed.
+ compositor->updateCompositingLayers(CompositingUpdateFinishAllDeferredWork);
if (!nodeId) {
buildLayerIdToNodeIdMap(errorString, compositor->rootRenderLayer(), layerIdToNodeIdMap);
gatherGraphicsLayers(compositor->rootGraphicsLayer(), layerIdToNodeIdMap, layers);
@@ -197,6 +199,10 @@ void InspectorLayerTreeAgent::getLayers(ErrorString* errorString, const int* nod
return;
}
RenderLayer* enclosingLayer = renderer->enclosingLayer();
+ if (!enclosingLayer->enclosingCompositingLayer() || !enclosingLayer->enclosingCompositingLayer()->compositedLayerMapping()) {
caseq 2013/10/18 05:39:56 I think this is never supposed to be true now that
+ *errorString = "No CompositedLayerMapping for the provided node";
+ return;
+ }
GraphicsLayer* enclosingGraphicsLayer = enclosingLayer->enclosingCompositingLayer()->compositedLayerMapping()->childForSuperlayers();
buildLayerIdToNodeIdMap(errorString, enclosingLayer, layerIdToNodeIdMap);
gatherGraphicsLayers(enclosingGraphicsLayer, layerIdToNodeIdMap, layers);
« no previous file with comments | « LayoutTests/http/tests/inspector/inspector-test.js ('k') | Source/core/page/Page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698