| 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> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/trace_event/trace_event.h" | 7 #include "base/trace_event/trace_event.h" |
| 8 #include "skia/ext/event_tracer_impl.h" | 8 #include "skia/ext/event_tracer_impl.h" |
| 9 #include "third_party/skia/include/utils/SkEventTracer.h" | 9 #include "third_party/skia/include/utils/SkEventTracer.h" |
| 10 | 10 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION( | 66 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION( |
| 67 categoryEnabledFlag, name, traceEventHandle); | 67 categoryEnabledFlag, name, traceEventHandle); |
| 68 } | 68 } |
| 69 | 69 |
| 70 } // namespace skia | 70 } // namespace skia |
| 71 | 71 |
| 72 | 72 |
| 73 void InitSkiaEventTracer() { | 73 void InitSkiaEventTracer() { |
| 74 // Initialize the binding to Skia's tracing events. Skia will | 74 // Initialize the binding to Skia's tracing events. Skia will |
| 75 // take ownership of and clean up the memory allocated here. | 75 // take ownership of and clean up the memory allocated here. |
| 76 if (!SkEventTracer::GetInstance()) | 76 SkEventTracer::SetInstance(new skia::SkChromiumEventTracer()); |
| 77 SkEventTracer::SetInstance(new skia::SkChromiumEventTracer()); | |
| 78 } | 77 } |
| OLD | NEW |