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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 void willAddPageOverlay(const GraphicsLayer*); | 65 void willAddPageOverlay(const GraphicsLayer*); |
66 void didRemovePageOverlay(const GraphicsLayer*); | 66 void didRemovePageOverlay(const GraphicsLayer*); |
67 | 67 |
68 // Called from InspectorInstrumentation | 68 // Called from InspectorInstrumentation |
69 void layerTreeDidChange(); | 69 void layerTreeDidChange(); |
70 void didPaint(RenderObject*, const GraphicsLayer*, GraphicsContext*, const L
ayoutRect&); | 70 void didPaint(RenderObject*, const GraphicsLayer*, GraphicsContext*, const L
ayoutRect&); |
71 | 71 |
72 // Called from the front-end. | 72 // Called from the front-end. |
73 virtual void enable(ErrorString*) override; | 73 virtual void enable(ErrorString*) override; |
74 virtual void disable(ErrorString*) override; | 74 virtual void disable(ErrorString*) override; |
75 virtual void compositingReasons(ErrorString*, const String& layerId, RefPtr<
TypeBuilder::Array<String> >&) override; | 75 virtual void compositingReasons(ErrorString*, const String& layerId, RefPtr<
TypeBuilder::Array<String>>&) override; |
76 virtual void makeSnapshot(ErrorString*, const String& layerId, String* snaps
hotId) override; | 76 virtual void makeSnapshot(ErrorString*, const String& layerId, String* snaps
hotId) override; |
77 virtual void loadSnapshot(ErrorString*, const RefPtr<JSONArray>& tiles, Stri
ng* snapshotId) override; | 77 virtual void loadSnapshot(ErrorString*, const RefPtr<JSONArray>& tiles, Stri
ng* snapshotId) override; |
78 virtual void releaseSnapshot(ErrorString*, const String& snapshotId) overrid
e; | 78 virtual void releaseSnapshot(ErrorString*, const String& snapshotId) overrid
e; |
79 virtual void replaySnapshot(ErrorString*, const String& snapshotId, const in
t* fromStep, const int* toStep, const double* scale, String* dataURL) override; | 79 virtual void replaySnapshot(ErrorString*, const String& snapshotId, const in
t* fromStep, const int* toStep, const double* scale, String* dataURL) override; |
80 virtual void profileSnapshot(ErrorString*, const String& snapshotId, const i
nt* minRepeatCount, const double* minDuration, const RefPtr<JSONObject>* clipRec
t, RefPtr<TypeBuilder::Array<TypeBuilder::Array<double> > >&) override; | 80 virtual void profileSnapshot(ErrorString*, const String& snapshotId, const i
nt* minRepeatCount, const double* minDuration, const RefPtr<JSONObject>* clipRec
t, RefPtr<TypeBuilder::Array<TypeBuilder::Array<double>>>&) override; |
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>> buildLayerTree
(); |
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(); | 91 GraphicsLayer* rootGraphicsLayer(); |
92 | 92 |
93 RenderLayerCompositor* renderLayerCompositor(); | 93 RenderLayerCompositor* renderLayerCompositor(); |
94 GraphicsLayer* layerById(ErrorString*, const String& layerId); | 94 GraphicsLayer* layerById(ErrorString*, const String& layerId); |
95 const PictureSnapshot* snapshotById(ErrorString*, const String& snapshotId); | 95 const PictureSnapshot* snapshotById(ErrorString*, const String& snapshotId); |
96 | 96 |
97 typedef HashMap<int, int> LayerIdToNodeIdMap; | 97 typedef HashMap<int, int> LayerIdToNodeIdMap; |
98 void buildLayerIdToNodeIdMap(RenderLayer*, LayerIdToNodeIdMap&); | 98 void buildLayerIdToNodeIdMap(RenderLayer*, LayerIdToNodeIdMap&); |
99 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>>&); |
100 int idForNode(Node*); | 100 int idForNode(Node*); |
101 | 101 |
102 InspectorFrontend::LayerTree* m_frontend; | 102 InspectorFrontend::LayerTree* m_frontend; |
103 RawPtrWillBeMember<Page> m_page; | 103 RawPtrWillBeMember<Page> m_page; |
104 Vector<int, 2> m_pageOverlayLayerIds; | 104 Vector<int, 2> m_pageOverlayLayerIds; |
105 | 105 |
106 typedef HashMap<String, RefPtr<PictureSnapshot> > SnapshotById; | 106 typedef HashMap<String, RefPtr<PictureSnapshot>> SnapshotById; |
107 SnapshotById m_snapshotById; | 107 SnapshotById m_snapshotById; |
108 }; | 108 }; |
109 | 109 |
110 } // namespace blink | 110 } // namespace blink |
111 | 111 |
112 | 112 |
113 #endif // !defined(InspectorLayerTreeAgent_h) | 113 #endif // !defined(InspectorLayerTreeAgent_h) |
OLD | NEW |