| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkEventTracer_DEFINED | 8 #ifndef SkEventTracer_DEFINED |
| 9 #define SkEventTracer_DEFINED | 9 #define SkEventTracer_DEFINED |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // These values must be in sync with macro values in trace_event.h in chromi
um. | 42 // These values must be in sync with macro values in trace_event.h in chromi
um. |
| 43 enum CategoryGroupEnabledFlags { | 43 enum CategoryGroupEnabledFlags { |
| 44 // Category group enabled for the recording mode. | 44 // Category group enabled for the recording mode. |
| 45 kEnabledForRecording_CategoryGroupEnabledFlags = 1 << 0, | 45 kEnabledForRecording_CategoryGroupEnabledFlags = 1 << 0, |
| 46 // Category group enabled for the monitoring mode. | 46 // Category group enabled for the monitoring mode. |
| 47 kEnabledForMonitoring_CategoryGroupEnabledFlags = 1 << 1, | 47 kEnabledForMonitoring_CategoryGroupEnabledFlags = 1 << 1, |
| 48 // Category group enabled by SetEventCallbackEnabled(). | 48 // Category group enabled by SetEventCallbackEnabled(). |
| 49 kEnabledForEventCallback_CategoryGroupEnabledFlags = 1 << 2, | 49 kEnabledForEventCallback_CategoryGroupEnabledFlags = 1 << 2, |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 virtual const unsigned char* getCategoryGroupEnabled(const char* name) = 0; | 52 virtual const uint8_t* getCategoryGroupEnabled(const char* name) = 0; |
| 53 virtual const char* getCategoryGroupName( | 53 virtual const char* getCategoryGroupName( |
| 54 const uint8_t* category_group_enabled) = 0; | 54 const uint8_t* category_group_enabled) = 0; |
| 55 | 55 |
| 56 virtual SkEventTracer::Handle | 56 virtual SkEventTracer::Handle |
| 57 addTraceEvent(char phase, | 57 addTraceEvent(char phase, |
| 58 const uint8_t* categoryEnabledFlag, | 58 const uint8_t* categoryEnabledFlag, |
| 59 const char* name, | 59 const char* name, |
| 60 uint64_t id, | 60 uint64_t id, |
| 61 int32_t numArgs, | 61 int32_t numArgs, |
| 62 const char** argNames, | 62 const char** argNames, |
| 63 const uint8_t* argTypes, | 63 const uint8_t* argTypes, |
| 64 const uint64_t* argValues, | 64 const uint64_t* argValues, |
| 65 uint8_t flags) = 0; | 65 uint8_t flags) = 0; |
| 66 | 66 |
| 67 virtual void | 67 virtual void |
| 68 updateTraceEventDuration(const uint8_t* categoryEnabledFlag, | 68 updateTraceEventDuration(const uint8_t* categoryEnabledFlag, |
| 69 const char* name, | 69 const char* name, |
| 70 SkEventTracer::Handle) = 0; | 70 SkEventTracer::Handle handle) = 0; |
| 71 private: | 71 private: |
| 72 static SkEventTracer *gInstance; | 72 static SkEventTracer *gInstance; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 #endif // SkEventTracer_DEFINED | 75 #endif // SkEventTracer_DEFINED |
| OLD | NEW |