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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 222 |
223 LayerIdToNodeIdMap layerIdToNodeIdMap; | 223 LayerIdToNodeIdMap layerIdToNodeIdMap; |
224 RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> > layers = TypeBuil
der::Array<TypeBuilder::LayerTree::Layer>::create(); | 224 RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> > layers = TypeBuil
der::Array<TypeBuilder::LayerTree::Layer>::create(); |
225 buildLayerIdToNodeIdMap(compositor->rootRenderLayer(), layerIdToNodeIdMap); | 225 buildLayerIdToNodeIdMap(compositor->rootRenderLayer(), layerIdToNodeIdMap); |
226 gatherGraphicsLayers(rootGraphicsLayer(), layerIdToNodeIdMap, layers); | 226 gatherGraphicsLayers(rootGraphicsLayer(), layerIdToNodeIdMap, layers); |
227 return layers.release(); | 227 return layers.release(); |
228 } | 228 } |
229 | 229 |
230 void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap(RenderLayer* root, LayerId
ToNodeIdMap& layerIdToNodeIdMap) | 230 void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap(RenderLayer* root, LayerId
ToNodeIdMap& layerIdToNodeIdMap) |
231 { | 231 { |
232 if (root->hasCompositedLayerMapping()) { | 232 if (CompositedLayerMapping* compositedLayerMapping = root->compositedLayerMa
pping()) { |
233 if (Node* node = root->renderer()->generatingNode()) { | 233 if (Node* node = root->renderer()->generatingNode()) { |
234 GraphicsLayer* graphicsLayer = root->compositedLayerMapping()->child
ForSuperlayers(); | 234 GraphicsLayer* graphicsLayer = compositedLayerMapping->childForSuper
layers(); |
235 layerIdToNodeIdMap.set(graphicsLayer->platformLayer()->id(), idForNo
de(node)); | 235 layerIdToNodeIdMap.set(graphicsLayer->platformLayer()->id(), idForNo
de(node)); |
236 } | 236 } |
237 } | 237 } |
238 for (RenderLayer* child = root->firstChild(); child; child = child->nextSibl
ing()) | 238 for (RenderLayer* child = root->firstChild(); child; child = child->nextSibl
ing()) |
239 buildLayerIdToNodeIdMap(child, layerIdToNodeIdMap); | 239 buildLayerIdToNodeIdMap(child, layerIdToNodeIdMap); |
240 if (!root->renderer()->isRenderIFrame()) | 240 if (!root->renderer()->isRenderIFrame()) |
241 return; | 241 return; |
242 FrameView* childFrameView = toFrameView(toRenderPart(root->renderer())->widg
et()); | 242 FrameView* childFrameView = toFrameView(toRenderPart(root->renderer())->widg
et()); |
243 if (RenderView* childRenderView = childFrameView->renderView()) { | 243 if (RenderView* childRenderView = childFrameView->renderView()) { |
244 if (RenderLayerCompositor* childCompositor = childRenderView->compositor
()) | 244 if (RenderLayerCompositor* childCompositor = childRenderView->compositor
()) |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) | 433 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) |
434 { | 434 { |
435 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); | 435 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); |
436 if (index == WTF::kNotFound) | 436 if (index == WTF::kNotFound) |
437 return; | 437 return; |
438 m_pageOverlayLayerIds.remove(index); | 438 m_pageOverlayLayerIds.remove(index); |
439 } | 439 } |
440 | 440 |
441 | 441 |
442 } // namespace blink | 442 } // namespace blink |
OLD | NEW |