| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 class ScriptArguments; | 81 class ScriptArguments; |
| 82 class ScriptCallStack; | 82 class ScriptCallStack; |
| 83 class ScriptState; | 83 class ScriptState; |
| 84 class TimelineRecordStack; | 84 class TimelineRecordStack; |
| 85 class WebSocketHandshakeRequest; | 85 class WebSocketHandshakeRequest; |
| 86 class WebSocketHandshakeResponse; | 86 class WebSocketHandshakeResponse; |
| 87 class XMLHttpRequest; | 87 class XMLHttpRequest; |
| 88 | 88 |
| 89 typedef String ErrorString; | 89 typedef String ErrorString; |
| 90 | 90 |
| 91 class TimelineTimeConverter { | |
| 92 public: | |
| 93 TimelineTimeConverter() | |
| 94 : m_startOffset(0) | |
| 95 { | |
| 96 } | |
| 97 double fromMonotonicallyIncreasingTime(double time) const { return (time -
m_startOffset) * 1000.0; } | |
| 98 void reset(); | |
| 99 | |
| 100 private: | |
| 101 double m_startOffset; | |
| 102 }; | |
| 103 | |
| 104 class InspectorTimelineAgent FINAL | 91 class InspectorTimelineAgent FINAL |
| 105 : public TraceEventTarget<InspectorTimelineAgent> | 92 : public TraceEventTarget<InspectorTimelineAgent> |
| 106 , public InspectorBaseAgent<InspectorTimelineAgent> | 93 , public InspectorBaseAgent<InspectorTimelineAgent> |
| 107 , public ScriptGCEventListener | 94 , public ScriptGCEventListener |
| 108 , public InspectorBackendDispatcher::TimelineCommandHandler | 95 , public InspectorBackendDispatcher::TimelineCommandHandler |
| 109 , public PlatformInstrumentationClient { | 96 , public PlatformInstrumentationClient { |
| 110 WTF_MAKE_NONCOPYABLE(InspectorTimelineAgent); | 97 WTF_MAKE_NONCOPYABLE(InspectorTimelineAgent); |
| 111 public: | 98 public: |
| 112 enum InspectorType { PageInspector, WorkerInspector }; | 99 enum InspectorType { PageInspector, WorkerInspector }; |
| 113 | 100 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 void innerAddRecordToTimeline(PassRefPtr<TypeBuilder::Timeline::TimelineEven
t>); | 275 void innerAddRecordToTimeline(PassRefPtr<TypeBuilder::Timeline::TimelineEven
t>); |
| 289 void clearRecordStack(); | 276 void clearRecordStack(); |
| 290 PassRefPtr<TypeBuilder::Timeline::TimelineEvent> createRecordForEvent(const
TraceEventDispatcher::TraceEvent&, const String& type, PassRefPtr<JSONObject> da
ta); | 277 PassRefPtr<TypeBuilder::Timeline::TimelineEvent> createRecordForEvent(const
TraceEventDispatcher::TraceEvent&, const String& type, PassRefPtr<JSONObject> da
ta); |
| 291 | 278 |
| 292 void localToPageQuad(const RenderObject& renderer, const LayoutRect&, FloatQ
uad*); | 279 void localToPageQuad(const RenderObject& renderer, const LayoutRect&, FloatQ
uad*); |
| 293 long long nodeId(Node*); | 280 long long nodeId(Node*); |
| 294 long long nodeId(RenderObject*); | 281 long long nodeId(RenderObject*); |
| 295 void releaseNodeIds(); | 282 void releaseNodeIds(); |
| 296 | 283 |
| 297 double timestamp(); | 284 double timestamp(); |
| 285 double toTimelineTimestamp(double); |
| 298 | 286 |
| 299 FrameHost* frameHost() const; | 287 FrameHost* frameHost() const; |
| 300 | 288 |
| 301 bool isStarted(); | 289 bool isStarted(); |
| 302 void innerStart(); | 290 void innerStart(); |
| 303 void innerStop(bool fromConsole); | 291 void innerStop(bool fromConsole); |
| 304 | 292 |
| 305 InspectorPageAgent* m_pageAgent; | 293 InspectorPageAgent* m_pageAgent; |
| 306 InspectorDOMAgent* m_domAgent; | 294 InspectorDOMAgent* m_domAgent; |
| 307 InspectorLayerTreeAgent* m_layerTreeAgent; | 295 InspectorLayerTreeAgent* m_layerTreeAgent; |
| 308 InspectorFrontend::Timeline* m_frontend; | 296 InspectorFrontend::Timeline* m_frontend; |
| 309 InspectorClient* m_client; | 297 InspectorClient* m_client; |
| 310 InspectorOverlay* m_overlay; | 298 InspectorOverlay* m_overlay; |
| 311 InspectorType m_inspectorType; | 299 InspectorType m_inspectorType; |
| 312 | 300 |
| 313 int m_id; | 301 int m_id; |
| 314 unsigned long long m_layerTreeId; | 302 unsigned long long m_layerTreeId; |
| 315 | 303 |
| 316 TimelineTimeConverter m_timeConverter; | |
| 317 int m_maxCallStackDepth; | 304 int m_maxCallStackDepth; |
| 318 | 305 |
| 319 Vector<TimelineRecordEntry> m_recordStack; | 306 Vector<TimelineRecordEntry> m_recordStack; |
| 320 RefPtr<TypeBuilder::Array<TypeBuilder::Timeline::TimelineEvent> > m_buffered
Events; | 307 RefPtr<TypeBuilder::Array<TypeBuilder::Timeline::TimelineEvent> > m_buffered
Events; |
| 321 Vector<String> m_consoleTimelines; | 308 Vector<String> m_consoleTimelines; |
| 322 | 309 |
| 323 typedef Vector<TimelineGCEvent> GCEvents; | 310 typedef Vector<TimelineGCEvent> GCEvents; |
| 324 GCEvents m_gcEvents; | 311 GCEvents m_gcEvents; |
| 325 unsigned m_platformInstrumentationClientInstalledAtStackDepth; | 312 unsigned m_platformInstrumentationClientInstalledAtStackDepth; |
| 326 RefPtr<TypeBuilder::Timeline::TimelineEvent> m_pendingFrameRecord; | 313 RefPtr<TypeBuilder::Timeline::TimelineEvent> m_pendingFrameRecord; |
| 327 RefPtr<TypeBuilder::Timeline::TimelineEvent> m_pendingGPURecord; | 314 RefPtr<TypeBuilder::Timeline::TimelineEvent> m_pendingGPURecord; |
| 328 typedef HashMap<unsigned long long, TimelineImageInfo> PixelRefToImageInfoMa
p; | 315 typedef HashMap<unsigned long long, TimelineImageInfo> PixelRefToImageInfoMa
p; |
| 329 PixelRefToImageInfoMap m_pixelRefToImageInfo; | 316 PixelRefToImageInfoMap m_pixelRefToImageInfo; |
| 330 RenderImage* m_imageBeingPainted; | 317 RenderImage* m_imageBeingPainted; |
| 331 HashMap<unsigned long long, long long> m_layerToNodeMap; | 318 HashMap<unsigned long long, long long> m_layerToNodeMap; |
| 332 double m_paintSetupStart; | 319 double m_paintSetupStart; |
| 333 double m_paintSetupEnd; | 320 double m_paintSetupEnd; |
| 334 RefPtr<JSONObject> m_gpuTask; | 321 RefPtr<JSONObject> m_gpuTask; |
| 335 unsigned m_styleRecalcElementCounter; | 322 unsigned m_styleRecalcElementCounter; |
| 336 typedef HashMap<ThreadIdentifier, TimelineThreadState> ThreadStateMap; | 323 typedef HashMap<ThreadIdentifier, TimelineThreadState> ThreadStateMap; |
| 337 ThreadStateMap m_threadStates; | 324 ThreadStateMap m_threadStates; |
| 338 bool m_mayEmitFirstPaint; | 325 bool m_mayEmitFirstPaint; |
| 339 }; | 326 }; |
| 340 | 327 |
| 341 } // namespace WebCore | 328 } // namespace WebCore |
| 342 | 329 |
| 343 #endif // !defined(InspectorTimelineAgent_h) | 330 #endif // !defined(InspectorTimelineAgent_h) |
| OLD | NEW |