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 | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 virtual void snapshotCommandLog(ErrorString*, const String& snapshotId, RefP
tr<TypeBuilder::Array<JSONObject> >&) override; | 81 virtual void snapshotCommandLog(ErrorString*, const String& snapshotId, RefP
tr<TypeBuilder::Array<JSONObject> >&) override; |
82 | 82 |
83 // Called by other agents. | 83 // Called by other agents. |
84 PassRefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> > buildLayerTre
e(); | 84 PassRefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> > buildLayerTre
e(); |
85 | 85 |
86 private: | 86 private: |
87 static unsigned s_lastSnapshotId; | 87 static unsigned s_lastSnapshotId; |
88 | 88 |
89 explicit InspectorLayerTreeAgent(Page*); | 89 explicit InspectorLayerTreeAgent(Page*); |
90 | 90 |
| 91 GraphicsLayer* rootGraphicsLayer(); |
| 92 |
91 RenderLayerCompositor* renderLayerCompositor(); | 93 RenderLayerCompositor* renderLayerCompositor(); |
92 GraphicsLayer* layerById(ErrorString*, const String& layerId); | 94 GraphicsLayer* layerById(ErrorString*, const String& layerId); |
93 const GraphicsContextSnapshot* snapshotById(ErrorString*, const String& snap
shotId); | 95 const GraphicsContextSnapshot* snapshotById(ErrorString*, const String& snap
shotId); |
94 | 96 |
95 typedef HashMap<int, int> LayerIdToNodeIdMap; | 97 typedef HashMap<int, int> LayerIdToNodeIdMap; |
96 void buildLayerIdToNodeIdMap(RenderLayer*, LayerIdToNodeIdMap&); | 98 void buildLayerIdToNodeIdMap(RenderLayer*, LayerIdToNodeIdMap&); |
97 void gatherGraphicsLayers(GraphicsLayer*, HashMap<int, int>& layerIdToNodeId
Map, RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> >&); | 99 void gatherGraphicsLayers(GraphicsLayer*, HashMap<int, int>& layerIdToNodeId
Map, RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> >&); |
98 int idForNode(Node*); | 100 int idForNode(Node*); |
99 | 101 |
100 InspectorFrontend::LayerTree* m_frontend; | 102 InspectorFrontend::LayerTree* m_frontend; |
101 RawPtrWillBeMember<Page> m_page; | 103 RawPtrWillBeMember<Page> m_page; |
102 Vector<int, 2> m_pageOverlayLayerIds; | 104 Vector<int, 2> m_pageOverlayLayerIds; |
103 | 105 |
104 typedef HashMap<String, RefPtr<GraphicsContextSnapshot> > SnapshotById; | 106 typedef HashMap<String, RefPtr<GraphicsContextSnapshot> > SnapshotById; |
105 SnapshotById m_snapshotById; | 107 SnapshotById m_snapshotById; |
106 }; | 108 }; |
107 | 109 |
108 } // namespace blink | 110 } // namespace blink |
109 | 111 |
110 | 112 |
111 #endif // !defined(InspectorLayerTreeAgent_h) | 113 #endif // !defined(InspectorLayerTreeAgent_h) |
OLD | NEW |