| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 return; | 176 return; |
| 177 } | 177 } |
| 178 RenderLayer* enclosingLayer = renderer->enclosingLayer(); | 178 RenderLayer* enclosingLayer = renderer->enclosingLayer(); |
| 179 GraphicsLayer* enclosingGraphicsLayer = enclosingLayer->enclosingCompositing
Layer()->backing()->childForSuperlayers(); | 179 GraphicsLayer* enclosingGraphicsLayer = enclosingLayer->enclosingCompositing
Layer()->backing()->childForSuperlayers(); |
| 180 buildLayerIdToNodeIdMap(errorString, enclosingLayer, layerIdToNodeIdMap); | 180 buildLayerIdToNodeIdMap(errorString, enclosingLayer, layerIdToNodeIdMap); |
| 181 gatherGraphicsLayers(enclosingGraphicsLayer, layerIdToNodeIdMap, layers); | 181 gatherGraphicsLayers(enclosingGraphicsLayer, layerIdToNodeIdMap, layers); |
| 182 } | 182 } |
| 183 | 183 |
| 184 void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap(ErrorString* errorString,
RenderLayer* root, LayerIdToNodeIdMap& layerIdToNodeIdMap) | 184 void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap(ErrorString* errorString,
RenderLayer* root, LayerIdToNodeIdMap& layerIdToNodeIdMap) |
| 185 { | 185 { |
| 186 if (root->isComposited()) { | 186 if (root->compositingState() == PaintsIntoOwnBacking || root->compositingSta
te() == HasOwnBackingButPaintsIntoAncestor) { |
| 187 if (Node* node = root->renderer()->generatingNode()) { | 187 if (Node* node = root->renderer()->generatingNode()) { |
| 188 GraphicsLayer* graphicsLayer = root->backing()->childForSuperlayers(
); | 188 GraphicsLayer* graphicsLayer = root->backing()->childForSuperlayers(
); |
| 189 layerIdToNodeIdMap.set(graphicsLayer->platformLayer()->id(), idForNo
de(errorString, node)); | 189 layerIdToNodeIdMap.set(graphicsLayer->platformLayer()->id(), idForNo
de(errorString, node)); |
| 190 } | 190 } |
| 191 } | 191 } |
| 192 for (RenderLayer* child = root->firstChild(); child; child = child->nextSibl
ing()) | 192 for (RenderLayer* child = root->firstChild(); child; child = child->nextSibl
ing()) |
| 193 buildLayerIdToNodeIdMap(errorString, child, layerIdToNodeIdMap); | 193 buildLayerIdToNodeIdMap(errorString, child, layerIdToNodeIdMap); |
| 194 if (!root->renderer()->isRenderIFrame()) | 194 if (!root->renderer()->isRenderIFrame()) |
| 195 return; | 195 return; |
| 196 FrameView* childFrameView = toFrameView(toRenderWidget(root->renderer())->wi
dget()); | 196 FrameView* childFrameView = toFrameView(toRenderWidget(root->renderer())->wi
dget()); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 continue; | 303 continue; |
| 304 reasonStrings->addItem(compositingReasonNames[i].protocolName); | 304 reasonStrings->addItem(compositingReasonNames[i].protocolName); |
| 305 #ifndef _NDEBUG | 305 #ifndef _NDEBUG |
| 306 reasonsBitmask &= ~compositingReasonNames[i].mask; | 306 reasonsBitmask &= ~compositingReasonNames[i].mask; |
| 307 #endif | 307 #endif |
| 308 } | 308 } |
| 309 ASSERT(!reasonsBitmask); | 309 ASSERT(!reasonsBitmask); |
| 310 } | 310 } |
| 311 | 311 |
| 312 } // namespace WebCore | 312 } // namespace WebCore |
| OLD | NEW |