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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 typedef String ErrorString; | 54 typedef String ErrorString; |
55 | 55 |
56 class CORE_EXPORT InspectorLayerTreeAgent final : public InspectorBaseAgent<Insp
ectorLayerTreeAgent, InspectorFrontend::LayerTree>, public InspectorBackendDispa
tcher::LayerTreeCommandHandler { | 56 class CORE_EXPORT InspectorLayerTreeAgent final : public InspectorBaseAgent<Insp
ectorLayerTreeAgent, InspectorFrontend::LayerTree>, public InspectorBackendDispa
tcher::LayerTreeCommandHandler { |
57 WTF_MAKE_NONCOPYABLE(InspectorLayerTreeAgent); | 57 WTF_MAKE_NONCOPYABLE(InspectorLayerTreeAgent); |
58 public: | 58 public: |
59 static PassOwnPtrWillBeRawPtr<InspectorLayerTreeAgent> create(InspectorPageA
gent* pageAgent) | 59 static PassOwnPtrWillBeRawPtr<InspectorLayerTreeAgent> create(InspectorPageA
gent* pageAgent) |
60 { | 60 { |
61 return adoptPtrWillBeNoop(new InspectorLayerTreeAgent(pageAgent)); | 61 return adoptPtrWillBeNoop(new InspectorLayerTreeAgent(pageAgent)); |
62 } | 62 } |
63 virtual ~InspectorLayerTreeAgent(); | 63 ~InspectorLayerTreeAgent() override; |
64 DECLARE_VIRTUAL_TRACE(); | 64 DECLARE_VIRTUAL_TRACE(); |
65 | 65 |
66 void disable(ErrorString*) override; | 66 void disable(ErrorString*) override; |
67 void restore() override; | 67 void restore() override; |
68 | 68 |
69 // Called from InspectorController | 69 // Called from InspectorController |
70 void willAddPageOverlay(const GraphicsLayer*); | 70 void willAddPageOverlay(const GraphicsLayer*); |
71 void didRemovePageOverlay(const GraphicsLayer*); | 71 void didRemovePageOverlay(const GraphicsLayer*); |
72 | 72 |
73 // Called from InspectorInstrumentation | 73 // Called from InspectorInstrumentation |
74 void layerTreeDidChange(); | 74 void layerTreeDidChange(); |
75 void didPaint(LayoutObject*, const GraphicsLayer*, GraphicsContext*, const L
ayoutRect&); | 75 void didPaint(LayoutObject*, const GraphicsLayer*, GraphicsContext*, const L
ayoutRect&); |
76 | 76 |
77 // Called from the front-end. | 77 // Called from the front-end. |
78 virtual void enable(ErrorString*) override; | 78 void enable(ErrorString*) override; |
79 virtual void compositingReasons(ErrorString*, const String& layerId, RefPtr<
TypeBuilder::Array<String> >&) override; | 79 void compositingReasons(ErrorString*, const String& layerId, RefPtr<TypeBuil
der::Array<String>>&) override; |
80 virtual void makeSnapshot(ErrorString*, const String& layerId, String* snaps
hotId) override; | 80 void makeSnapshot(ErrorString*, const String& layerId, String* snapshotId) o
verride; |
81 virtual void loadSnapshot(ErrorString*, const RefPtr<JSONArray>& tiles, Stri
ng* snapshotId) override; | 81 void loadSnapshot(ErrorString*, const RefPtr<JSONArray>& tiles, String* snap
shotId) override; |
82 virtual void releaseSnapshot(ErrorString*, const String& snapshotId) overrid
e; | 82 void releaseSnapshot(ErrorString*, const String& snapshotId) override; |
83 virtual void replaySnapshot(ErrorString*, const String& snapshotId, const in
t* fromStep, const int* toStep, const double* scale, String* dataURL) override; | 83 void replaySnapshot(ErrorString*, const String& snapshotId, const int* fromS
tep, const int* toStep, const double* scale, String* dataURL) override; |
84 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; | 84 void profileSnapshot(ErrorString*, const String& snapshotId, const int* minR
epeatCount, const double* minDuration, const RefPtr<JSONObject>* clipRect, RefPt
r<TypeBuilder::Array<TypeBuilder::Array<double>>>&) override; |
85 virtual void snapshotCommandLog(ErrorString*, const String& snapshotId, RefP
tr<TypeBuilder::Array<JSONObject> >&) override; | 85 void snapshotCommandLog(ErrorString*, const String& snapshotId, RefPtr<TypeB
uilder::Array<JSONObject>>&) override; |
86 | 86 |
87 // Called by other agents. | 87 // Called by other agents. |
88 PassRefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> > buildLayerTre
e(); | 88 PassRefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> > buildLayerTre
e(); |
89 | 89 |
90 private: | 90 private: |
91 static unsigned s_lastSnapshotId; | 91 static unsigned s_lastSnapshotId; |
92 | 92 |
93 explicit InspectorLayerTreeAgent(InspectorPageAgent*); | 93 explicit InspectorLayerTreeAgent(InspectorPageAgent*); |
94 | 94 |
95 GraphicsLayer* rootGraphicsLayer(); | 95 GraphicsLayer* rootGraphicsLayer(); |
(...skipping 11 matching lines...) Expand all Loading... |
107 Vector<int, 2> m_pageOverlayLayerIds; | 107 Vector<int, 2> m_pageOverlayLayerIds; |
108 | 108 |
109 typedef HashMap<String, RefPtr<PictureSnapshot> > SnapshotById; | 109 typedef HashMap<String, RefPtr<PictureSnapshot> > SnapshotById; |
110 SnapshotById m_snapshotById; | 110 SnapshotById m_snapshotById; |
111 }; | 111 }; |
112 | 112 |
113 } // namespace blink | 113 } // namespace blink |
114 | 114 |
115 | 115 |
116 #endif // !defined(InspectorLayerTreeAgent_h) | 116 #endif // !defined(InspectorLayerTreeAgent_h) |
OLD | NEW |