Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: Source/core/inspector/TimelineTraceEventProcessor.h

Issue 91183002: Timeline: do not rely on UpdateLayer & PaintLayer trace events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: re-upload Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 bool maybeEnterLayerTask(const TraceEvent&, TimelineThreadState&); 196 bool maybeEnterLayerTask(const TraceEvent&, TimelineThreadState&);
197 void leaveLayerTask(TimelineThreadState&); 197 void leaveLayerTask(TimelineThreadState&);
198 198
199 void processBackgroundEvents(); 199 void processBackgroundEvents();
200 void processBackgroundEventsTask(); 200 void processBackgroundEventsTask();
201 PassRefPtr<JSONObject> createRecord(const TraceEvent&, const String& recordT ype, PassRefPtr<JSONObject> data = 0); 201 PassRefPtr<JSONObject> createRecord(const TraceEvent&, const String& recordT ype, PassRefPtr<JSONObject> data = 0);
202 202
203 void registerHandler(const char* name, char, TraceEventHandler); 203 void registerHandler(const char* name, char, TraceEventHandler);
204 204
205 void onBeginFrame(const TraceEvent&); 205 void onBeginFrame(const TraceEvent&);
206 void onUpdateLayerBegin(const TraceEvent&);
207 void onUpdateLayerEnd(const TraceEvent&);
208 void onPaintLayerBegin(const TraceEvent&);
209 void onPaintLayerEnd(const TraceEvent&);
210 void onPaintSetupBegin(const TraceEvent&); 206 void onPaintSetupBegin(const TraceEvent&);
211 void onPaintSetupEnd(const TraceEvent&); 207 void onPaintSetupEnd(const TraceEvent&);
212 void onRasterTaskBegin(const TraceEvent&); 208 void onRasterTaskBegin(const TraceEvent&);
213 void onRasterTaskEnd(const TraceEvent&); 209 void onRasterTaskEnd(const TraceEvent&);
214 void onPaint(const TraceEvent&); 210 void onPaint(const TraceEvent&);
215 void onImageDecodeBegin(const TraceEvent&); 211 void onImageDecodeBegin(const TraceEvent&);
216 void onImageDecodeEnd(const TraceEvent&); 212 void onImageDecodeEnd(const TraceEvent&);
217 void onLayerDeleted(const TraceEvent&); 213 void onLayerDeleted(const TraceEvent&);
218 void onDrawLazyPixelRef(const TraceEvent&); 214 void onDrawLazyPixelRef(const TraceEvent&);
219 void onDecodeLazyPixelRefBegin(const TraceEvent&); 215 void onDecodeLazyPixelRefBegin(const TraceEvent&);
(...skipping 10 matching lines...) Expand all
230 HandlersMap m_handlersByType; 226 HandlersMap m_handlersByType;
231 Mutex m_backgroundEventsMutex; 227 Mutex m_backgroundEventsMutex;
232 Vector<TraceEvent> m_backgroundEvents; 228 Vector<TraceEvent> m_backgroundEvents;
233 double m_lastEventProcessingTime; 229 double m_lastEventProcessingTime;
234 bool m_processEventsTaskInFlight; 230 bool m_processEventsTaskInFlight;
235 231
236 typedef HashMap<ThreadIdentifier, TimelineThreadState> ThreadStateMap; 232 typedef HashMap<ThreadIdentifier, TimelineThreadState> ThreadStateMap;
237 ThreadStateMap m_threadStates; 233 ThreadStateMap m_threadStates;
238 234
239 HashMap<unsigned long long, long long> m_layerToNodeMap; 235 HashMap<unsigned long long, long long> m_layerToNodeMap;
240 unsigned long long m_layerId;
241 double m_paintSetupStart; 236 double m_paintSetupStart;
242 double m_paintSetupEnd; 237 double m_paintSetupEnd;
243 RefPtr<JSONObject> m_gpuTask; 238 RefPtr<JSONObject> m_gpuTask;
244 239
245 struct ImageInfo { 240 struct ImageInfo {
246 int backendNodeId; 241 int backendNodeId;
247 String url; 242 String url;
248 243
249 ImageInfo() : backendNodeId(0) { } 244 ImageInfo() : backendNodeId(0) { }
250 ImageInfo(int backendNodeId, String url) : backendNodeId(backendNodeId), url(url) { } 245 ImageInfo(int backendNodeId, String url) : backendNodeId(backendNodeId), url(url) { }
251 }; 246 };
252 typedef HashMap<unsigned long long, ImageInfo> PixelRefToImageInfoMap; 247 typedef HashMap<unsigned long long, ImageInfo> PixelRefToImageInfoMap;
253 PixelRefToImageInfoMap m_pixelRefToImageInfo; 248 PixelRefToImageInfoMap m_pixelRefToImageInfo;
254 }; 249 };
255 250
256 } // namespace WebCore 251 } // namespace WebCore
257 252
258 #endif // !defined(TimelineTraceEventProcessor_h) 253 #endif // !defined(TimelineTraceEventProcessor_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorTimelineAgent.cpp ('k') | Source/core/inspector/TimelineTraceEventProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698