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

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: patch for landing 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..f7098bc2afc0f606049f7e5ca99798021b3e682a 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,7 @@ void InspectorLayerTreeAgent::getLayers(ErrorString* errorString, const int* nod
return;
}
RenderLayer* enclosingLayer = renderer->enclosingLayer();
+ ASSERT(enclosingLayer->enclosingCompositingLayer());
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