OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 return; | 197 return; |
198 } | 198 } |
199 RenderLayer* enclosingLayer = renderer->enclosingLayer(); | 199 RenderLayer* enclosingLayer = renderer->enclosingLayer(); |
200 GraphicsLayer* enclosingGraphicsLayer = enclosingLayer->enclosingCompositing
Layer()->compositedLayerMapping()->childForSuperlayers(); | 200 GraphicsLayer* enclosingGraphicsLayer = enclosingLayer->enclosingCompositing
Layer()->compositedLayerMapping()->childForSuperlayers(); |
201 buildLayerIdToNodeIdMap(errorString, enclosingLayer, layerIdToNodeIdMap); | 201 buildLayerIdToNodeIdMap(errorString, enclosingLayer, layerIdToNodeIdMap); |
202 gatherGraphicsLayers(enclosingGraphicsLayer, layerIdToNodeIdMap, layers); | 202 gatherGraphicsLayers(enclosingGraphicsLayer, layerIdToNodeIdMap, layers); |
203 } | 203 } |
204 | 204 |
205 void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap(ErrorString* errorString,
RenderLayer* root, LayerIdToNodeIdMap& layerIdToNodeIdMap) | 205 void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap(ErrorString* errorString,
RenderLayer* root, LayerIdToNodeIdMap& layerIdToNodeIdMap) |
206 { | 206 { |
207 if (root->isComposited()) { | 207 if (root->compositedLayerMapping()) { |
208 if (Node* node = root->renderer()->generatingNode()) { | 208 if (Node* node = root->renderer()->generatingNode()) { |
209 GraphicsLayer* graphicsLayer = root->compositedLayerMapping()->child
ForSuperlayers(); | 209 GraphicsLayer* graphicsLayer = root->compositedLayerMapping()->child
ForSuperlayers(); |
210 layerIdToNodeIdMap.set(graphicsLayer->platformLayer()->id(), idForNo
de(errorString, node)); | 210 layerIdToNodeIdMap.set(graphicsLayer->platformLayer()->id(), idForNo
de(errorString, node)); |
211 } | 211 } |
212 } | 212 } |
213 for (RenderLayer* child = root->firstChild(); child; child = child->nextSibl
ing()) | 213 for (RenderLayer* child = root->firstChild(); child; child = child->nextSibl
ing()) |
214 buildLayerIdToNodeIdMap(errorString, child, layerIdToNodeIdMap); | 214 buildLayerIdToNodeIdMap(errorString, child, layerIdToNodeIdMap); |
215 if (!root->renderer()->isRenderIFrame()) | 215 if (!root->renderer()->isRenderIFrame()) |
216 return; | 216 return; |
217 FrameView* childFrameView = toFrameView(toRenderWidget(root->renderer())->wi
dget()); | 217 FrameView* childFrameView = toFrameView(toRenderWidget(root->renderer())->wi
dget()); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 continue; | 324 continue; |
325 reasonStrings->addItem(compositingReasonNames[i].protocolName); | 325 reasonStrings->addItem(compositingReasonNames[i].protocolName); |
326 #ifndef _NDEBUG | 326 #ifndef _NDEBUG |
327 reasonsBitmask &= ~compositingReasonNames[i].mask; | 327 reasonsBitmask &= ~compositingReasonNames[i].mask; |
328 #endif | 328 #endif |
329 } | 329 } |
330 ASSERT(!reasonsBitmask); | 330 ASSERT(!reasonsBitmask); |
331 } | 331 } |
332 | 332 |
333 } // namespace WebCore | 333 } // namespace WebCore |
OLD | NEW |