| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 class WebSocketHandshakeRequest; | 76 class WebSocketHandshakeRequest; |
| 77 class WebSocketHandshakeResponse; | 77 class WebSocketHandshakeResponse; |
| 78 class XMLHttpRequest; | 78 class XMLHttpRequest; |
| 79 | 79 |
| 80 typedef String ErrorString; | 80 typedef String ErrorString; |
| 81 | 81 |
| 82 namespace TimelineRecordType { | 82 namespace TimelineRecordType { |
| 83 extern const char DecodeImage[]; | 83 extern const char DecodeImage[]; |
| 84 extern const char Rasterize[]; | 84 extern const char Rasterize[]; |
| 85 extern const char PaintSetup[]; | 85 extern const char PaintSetup[]; |
| 86 extern const char GPUTask[]; |
| 86 }; | 87 }; |
| 87 | 88 |
| 88 class TimelineTimeConverter { | 89 class TimelineTimeConverter { |
| 89 public: | 90 public: |
| 90 TimelineTimeConverter() | 91 TimelineTimeConverter() |
| 91 : m_startOffset(0) | 92 : m_startOffset(0) |
| 92 { | 93 { |
| 93 } | 94 } |
| 94 double fromMonotonicallyIncreasingTime(double time) const { return (time -
m_startOffset) * 1000.0; } | 95 double fromMonotonicallyIncreasingTime(double time) const { return (time -
m_startOffset) * 1000.0; } |
| 95 void reset(); | 96 void reset(); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 113 } | 114 } |
| 114 | 115 |
| 115 ~InspectorTimelineAgent(); | 116 ~InspectorTimelineAgent(); |
| 116 | 117 |
| 117 virtual void setFrontend(InspectorFrontend*); | 118 virtual void setFrontend(InspectorFrontend*); |
| 118 virtual void clearFrontend(); | 119 virtual void clearFrontend(); |
| 119 virtual void restore(); | 120 virtual void restore(); |
| 120 | 121 |
| 121 virtual void enable(ErrorString*); | 122 virtual void enable(ErrorString*); |
| 122 virtual void disable(ErrorString*); | 123 virtual void disable(ErrorString*); |
| 123 virtual void start(ErrorString*, const int* maxCallStackDepth, const bool* b
ufferEvents, const bool* includeDomCounters); | 124 virtual void start(ErrorString*, const int* maxCallStackDepth, const bool* b
ufferEvents, const bool* includeDomCounters, const bool* includeGPUEvents); |
| 124 virtual void stop(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Timel
ine::TimelineEvent> >& events); | 125 virtual void stop(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Timel
ine::TimelineEvent> >& events); |
| 125 | 126 |
| 126 void setLayerTreeId(int layerTreeId) { m_layerTreeId = layerTreeId; } | 127 void setLayerTreeId(int layerTreeId) { m_layerTreeId = layerTreeId; } |
| 127 int layerTreeId() const { return m_layerTreeId; } | 128 int layerTreeId() const { return m_layerTreeId; } |
| 128 int id() const { return m_id; } | 129 int id() const { return m_id; } |
| 129 | 130 |
| 130 void didCommitLoad(); | 131 void didCommitLoad(); |
| 131 | 132 |
| 132 // Methods called from WebCore. | 133 // Methods called from WebCore. |
| 133 bool willCallFunction(ExecutionContext*, const String& scriptName, int scrip
tLine); | 134 bool willCallFunction(ExecutionContext*, const String& scriptName, int scrip
tLine); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 long long nodeId(RenderObject*); | 267 long long nodeId(RenderObject*); |
| 267 void releaseNodeIds(); | 268 void releaseNodeIds(); |
| 268 | 269 |
| 269 double timestamp(); | 270 double timestamp(); |
| 270 Page* page(); | 271 Page* page(); |
| 271 | 272 |
| 272 bool isStarted(); | 273 bool isStarted(); |
| 273 void innerStart(); | 274 void innerStart(); |
| 274 void innerStop(bool fromConsole); | 275 void innerStop(bool fromConsole); |
| 275 | 276 |
| 277 bool isCollectingGPUEvents() const; |
| 278 |
| 276 InspectorPageAgent* m_pageAgent; | 279 InspectorPageAgent* m_pageAgent; |
| 277 InspectorMemoryAgent* m_memoryAgent; | 280 InspectorMemoryAgent* m_memoryAgent; |
| 278 InspectorDOMAgent* m_domAgent; | 281 InspectorDOMAgent* m_domAgent; |
| 279 TimelineTimeConverter m_timeConverter; | 282 TimelineTimeConverter m_timeConverter; |
| 280 | 283 |
| 281 InspectorFrontend::Timeline* m_frontend; | 284 InspectorFrontend::Timeline* m_frontend; |
| 282 double m_timestampOffset; | 285 double m_timestampOffset; |
| 283 | 286 |
| 284 Vector<TimelineRecordEntry> m_recordStack; | 287 Vector<TimelineRecordEntry> m_recordStack; |
| 285 | 288 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 305 unsigned m_styleRecalcElementCounter; | 308 unsigned m_styleRecalcElementCounter; |
| 306 int m_layerTreeId; | 309 int m_layerTreeId; |
| 307 RenderImage* m_imageBeingPainted; | 310 RenderImage* m_imageBeingPainted; |
| 308 Vector<String> m_consoleTimelines; | 311 Vector<String> m_consoleTimelines; |
| 309 RefPtr<TypeBuilder::Array<TypeBuilder::Timeline::TimelineEvent> > m_buffered
Events; | 312 RefPtr<TypeBuilder::Array<TypeBuilder::Timeline::TimelineEvent> > m_buffered
Events; |
| 310 }; | 313 }; |
| 311 | 314 |
| 312 } // namespace WebCore | 315 } // namespace WebCore |
| 313 | 316 |
| 314 #endif // !defined(InspectorTimelineAgent_h) | 317 #endif // !defined(InspectorTimelineAgent_h) |
| OLD | NEW |