OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 class FloatQuad; | 62 class FloatQuad; |
63 class LocalFrame; | 63 class LocalFrame; |
64 class FrameHost; | 64 class FrameHost; |
65 class GraphicsContext; | 65 class GraphicsContext; |
66 class GraphicsLayer; | 66 class GraphicsLayer; |
67 class InspectorClient; | 67 class InspectorClient; |
68 class InspectorDOMAgent; | 68 class InspectorDOMAgent; |
69 class InspectorFrontend; | 69 class InspectorFrontend; |
70 class InspectorOverlay; | 70 class InspectorOverlay; |
71 class InspectorPageAgent; | 71 class InspectorPageAgent; |
| 72 class InspectorTracingAgent; |
72 class InspectorLayerTreeAgent; | 73 class InspectorLayerTreeAgent; |
73 class InstrumentingAgents; | 74 class InstrumentingAgents; |
74 class KURL; | 75 class KURL; |
75 class NewScriptState; | 76 class NewScriptState; |
76 class Node; | 77 class Node; |
77 class RenderImage; | 78 class RenderImage; |
78 class RenderObject; | 79 class RenderObject; |
79 class ResourceError; | 80 class ResourceError; |
80 class ResourceLoader; | 81 class ResourceLoader; |
81 class ResourceRequest; | 82 class ResourceRequest; |
(...skipping 26 matching lines...) Expand all Loading... |
108 foreign(foreign), | 109 foreign(foreign), |
109 usedGPUMemoryBytes(usedGPUMemoryBytes), | 110 usedGPUMemoryBytes(usedGPUMemoryBytes), |
110 limitGPUMemoryBytes(limitGPUMemoryBytes) { } | 111 limitGPUMemoryBytes(limitGPUMemoryBytes) { } |
111 double timestamp; | 112 double timestamp; |
112 Phase phase; | 113 Phase phase; |
113 bool foreign; | 114 bool foreign; |
114 uint64_t usedGPUMemoryBytes; | 115 uint64_t usedGPUMemoryBytes; |
115 uint64_t limitGPUMemoryBytes; | 116 uint64_t limitGPUMemoryBytes; |
116 }; | 117 }; |
117 | 118 |
118 static PassOwnPtr<InspectorTimelineAgent> create(InspectorPageAgent* pageAge
nt, InspectorDOMAgent* domAgent, InspectorLayerTreeAgent* layerTreeAgent, | 119 static PassOwnPtr<InspectorTimelineAgent> create(InspectorPageAgent* pageAge
nt, InspectorDOMAgent* domAgent, InspectorLayerTreeAgent* layerTreeAgent, Inspec
torTracingAgent* tracingAgent, |
119 InspectorOverlay* overlay, InspectorType type, InspectorClient* client) | 120 InspectorOverlay* overlay, InspectorType type, InspectorClient* client) |
120 { | 121 { |
121 return adoptPtr(new InspectorTimelineAgent(pageAgent, domAgent, layerTre
eAgent, overlay, type, client)); | 122 return adoptPtr(new InspectorTimelineAgent(pageAgent, domAgent, layerTre
eAgent, tracingAgent, overlay, type, client)); |
122 } | 123 } |
123 | 124 |
124 virtual ~InspectorTimelineAgent(); | 125 virtual ~InspectorTimelineAgent(); |
125 | 126 |
126 virtual void setFrontend(InspectorFrontend*) OVERRIDE; | 127 virtual void setFrontend(InspectorFrontend*) OVERRIDE; |
127 virtual void clearFrontend() OVERRIDE; | 128 virtual void clearFrontend() OVERRIDE; |
128 virtual void restore() OVERRIDE; | 129 virtual void restore() OVERRIDE; |
129 | 130 |
130 virtual void enable(ErrorString*, const String* traceEventCategoryFilter) OV
ERRIDE; | 131 virtual void enable(ErrorString*) OVERRIDE; |
131 virtual void disable(ErrorString*) OVERRIDE; | 132 virtual void disable(ErrorString*) OVERRIDE; |
132 virtual void start(ErrorString*, const int* maxCallStackDepth, const bool* b
ufferEvents, const String* liveEvents, const bool* includeCounters, const bool*
includeGPUEvents) OVERRIDE; | 133 virtual void start(ErrorString*, const int* maxCallStackDepth, const bool* b
ufferEvents, const String* liveEvents, const bool* includeCounters, const bool*
includeGPUEvents) OVERRIDE; |
133 virtual void stop(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Timel
ine::TimelineEvent> >& events) OVERRIDE; | 134 virtual void stop(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Timel
ine::TimelineEvent> >& events) OVERRIDE; |
134 | 135 |
135 void setLayerTreeId(int layerTreeId) { m_layerTreeId = layerTreeId; } | 136 void setLayerTreeId(int layerTreeId) { m_layerTreeId = layerTreeId; } |
136 int id() const { return m_id; } | 137 int id() const { return m_id; } |
137 | 138 |
138 void didCommitLoad(); | 139 void didCommitLoad(); |
139 | 140 |
140 // Methods called from WebCore. | 141 // Methods called from WebCore. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 // PlatformInstrumentationClient methods. | 231 // PlatformInstrumentationClient methods. |
231 virtual void willDecodeImage(const String& imageType) OVERRIDE; | 232 virtual void willDecodeImage(const String& imageType) OVERRIDE; |
232 virtual void didDecodeImage() OVERRIDE; | 233 virtual void didDecodeImage() OVERRIDE; |
233 virtual void willResizeImage(bool shouldCache) OVERRIDE; | 234 virtual void willResizeImage(bool shouldCache) OVERRIDE; |
234 virtual void didResizeImage() OVERRIDE; | 235 virtual void didResizeImage() OVERRIDE; |
235 | 236 |
236 private: | 237 private: |
237 | 238 |
238 friend class TimelineRecordStack; | 239 friend class TimelineRecordStack; |
239 | 240 |
240 InspectorTimelineAgent(InspectorPageAgent*, InspectorDOMAgent*, InspectorLay
erTreeAgent*, InspectorOverlay*, InspectorType, InspectorClient*); | 241 InspectorTimelineAgent(InspectorPageAgent*, InspectorDOMAgent*, InspectorLay
erTreeAgent*, InspectorTracingAgent*, InspectorOverlay*, InspectorType, Inspecto
rClient*); |
241 | 242 |
242 // Trace event handlers | 243 // Trace event handlers |
243 void onBeginImplSideFrame(const TraceEventDispatcher::TraceEvent&); | 244 void onBeginImplSideFrame(const TraceEventDispatcher::TraceEvent&); |
244 void onPaintSetupBegin(const TraceEventDispatcher::TraceEvent&); | 245 void onPaintSetupBegin(const TraceEventDispatcher::TraceEvent&); |
245 void onPaintSetupEnd(const TraceEventDispatcher::TraceEvent&); | 246 void onPaintSetupEnd(const TraceEventDispatcher::TraceEvent&); |
246 void onRasterTaskBegin(const TraceEventDispatcher::TraceEvent&); | 247 void onRasterTaskBegin(const TraceEventDispatcher::TraceEvent&); |
247 void onRasterTaskEnd(const TraceEventDispatcher::TraceEvent&); | 248 void onRasterTaskEnd(const TraceEventDispatcher::TraceEvent&); |
248 void onImageDecodeBegin(const TraceEventDispatcher::TraceEvent&); | 249 void onImageDecodeBegin(const TraceEventDispatcher::TraceEvent&); |
249 void onImageDecodeEnd(const TraceEventDispatcher::TraceEvent&); | 250 void onImageDecodeEnd(const TraceEventDispatcher::TraceEvent&); |
250 void onLayerDeleted(const TraceEventDispatcher::TraceEvent&); | 251 void onLayerDeleted(const TraceEventDispatcher::TraceEvent&); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 LocalFrame* mainFrame() const; | 290 LocalFrame* mainFrame() const; |
290 | 291 |
291 bool isStarted(); | 292 bool isStarted(); |
292 void innerStart(); | 293 void innerStart(); |
293 void innerStop(bool fromConsole); | 294 void innerStop(bool fromConsole); |
294 void setLiveEvents(const String&); | 295 void setLiveEvents(const String&); |
295 | 296 |
296 InspectorPageAgent* m_pageAgent; | 297 InspectorPageAgent* m_pageAgent; |
297 InspectorDOMAgent* m_domAgent; | 298 InspectorDOMAgent* m_domAgent; |
298 InspectorLayerTreeAgent* m_layerTreeAgent; | 299 InspectorLayerTreeAgent* m_layerTreeAgent; |
| 300 InspectorTracingAgent* m_tracingAgent; |
299 InspectorFrontend::Timeline* m_frontend; | 301 InspectorFrontend::Timeline* m_frontend; |
300 InspectorClient* m_client; | 302 InspectorClient* m_client; |
301 InspectorOverlay* m_overlay; | 303 InspectorOverlay* m_overlay; |
302 InspectorType m_inspectorType; | 304 InspectorType m_inspectorType; |
303 | 305 |
304 int m_id; | 306 int m_id; |
305 unsigned long long m_layerTreeId; | 307 unsigned long long m_layerTreeId; |
306 | 308 |
307 int m_maxCallStackDepth; | 309 int m_maxCallStackDepth; |
308 | 310 |
(...skipping 11 matching lines...) Expand all Loading... |
320 double m_paintSetupStart; | 322 double m_paintSetupStart; |
321 double m_paintSetupEnd; | 323 double m_paintSetupEnd; |
322 RefPtr<JSONObject> m_gpuTask; | 324 RefPtr<JSONObject> m_gpuTask; |
323 RefPtr<JSONValue> m_pendingLayerTreeData; | 325 RefPtr<JSONValue> m_pendingLayerTreeData; |
324 unsigned m_styleRecalcElementCounter; | 326 unsigned m_styleRecalcElementCounter; |
325 typedef HashMap<ThreadIdentifier, TimelineThreadState> ThreadStateMap; | 327 typedef HashMap<ThreadIdentifier, TimelineThreadState> ThreadStateMap; |
326 ThreadStateMap m_threadStates; | 328 ThreadStateMap m_threadStates; |
327 bool m_mayEmitFirstPaint; | 329 bool m_mayEmitFirstPaint; |
328 HashSet<String> m_liveEvents; | 330 HashSet<String> m_liveEvents; |
329 double m_lastProgressTimestamp; | 331 double m_lastProgressTimestamp; |
330 bool m_disableTracingOnStop; | |
331 }; | 332 }; |
332 | 333 |
333 } // namespace WebCore | 334 } // namespace WebCore |
334 | 335 |
335 #endif // !defined(InspectorTimelineAgent_h) | 336 #endif // !defined(InspectorTimelineAgent_h) |
OLD | NEW |