Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vsyncprofiler.h
Go to the documentation of this file.
1 
18 #ifndef ION_PROFILE_VSYNCPROFILER_H_
19 #define ION_PROFILE_VSYNCPROFILER_H_
20 
22 
25 
26 namespace ion {
27 namespace profile {
28 
40  public:
42  static VSyncProfiler* Get();
43 
44  VSyncProfiler();
48 
50 
52  void RecordVSyncEvent(uint32 timestamp, uint32 vsync_number);
53 
54  private:
56  ion::profile::TraceRecorder* vsync_trace_recorder_;
57 
59  uint32 last_vsync_timestamp_;
60 };
61 
62 } // namespace profile
63 } // namespace ion
64 
65 #if ION_PRODUCTION
66 #define ION_PROFILE_VSYNC(timestamp, vsync_number)
67 #else
68 #define ION_PROFILE_VSYNC(timestamp, vsync_number) \
69  ::ion::profile::VSyncProfiler::Get()->RecordVSyncEvent( \
70  timestamp, vsync_number);
71 #endif // ION_PRODUCTION
72 
73 #endif // ION_PROFILE_VSYNCPROFILER_H_
Class for recording frame events.
Definition: tracerecorder.h:42
static VSyncProfiler * Get()
Gets the VSyncProfiler singleton instance.
Manages call trace recording for visualization in Web Tracing Framework (WTF) format.
Singleton class that augments CallTraceManager with VSync tracing support.
Definition: vsyncprofiler.h:39
void RecordVSyncEvent(uint32 timestamp, uint32 vsync_number)
Records a VSync event at given timestamp.