| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdint.h> |
| 6 |
| 5 #include "base/trace_event/trace_event.h" | 7 #include "base/trace_event/trace_event.h" |
| 6 #include "skia/ext/event_tracer_impl.h" | 8 #include "skia/ext/event_tracer_impl.h" |
| 7 #include "third_party/skia/include/utils/SkEventTracer.h" | 9 #include "third_party/skia/include/utils/SkEventTracer.h" |
| 8 | 10 |
| 9 namespace skia { | 11 namespace skia { |
| 10 | 12 |
| 11 class SkChromiumEventTracer: public SkEventTracer { | 13 class SkChromiumEventTracer: public SkEventTracer { |
| 12 const uint8_t* getCategoryGroupEnabled(const char* name) override; | 14 const uint8_t* getCategoryGroupEnabled(const char* name) override; |
| 13 const char* getCategoryGroupName(const uint8_t* categoryEnabledFlag) override; | 15 const char* getCategoryGroupName(const uint8_t* categoryEnabledFlag) override; |
| 14 SkEventTracer::Handle addTraceEvent(char phase, | 16 SkEventTracer::Handle addTraceEvent(char phase, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 68 |
| 67 } // namespace skia | 69 } // namespace skia |
| 68 | 70 |
| 69 | 71 |
| 70 void InitSkiaEventTracer() { | 72 void InitSkiaEventTracer() { |
| 71 // Initialize the binding to Skia's tracing events. Skia will | 73 // Initialize the binding to Skia's tracing events. Skia will |
| 72 // take ownership of and clean up the memory allocated here. | 74 // take ownership of and clean up the memory allocated here. |
| 73 if (!SkEventTracer::GetInstance()) | 75 if (!SkEventTracer::GetInstance()) |
| 74 SkEventTracer::SetInstance(new skia::SkChromiumEventTracer()); | 76 SkEventTracer::SetInstance(new skia::SkChromiumEventTracer()); |
| 75 } | 77 } |
| OLD | NEW |