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

Side by Side Diff: skia/ext/event_tracer_impl.cc

Issue 1408583002: Enable Skia tracing in browser process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Single process mode fix Created 5 years, 2 months 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
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/trace_event/trace_event.h" 5 #include "base/trace_event/trace_event.h"
6 #include "skia/ext/event_tracer_impl.h" 6 #include "skia/ext/event_tracer_impl.h"
7 #include "third_party/skia/include/utils/SkEventTracer.h" 7 #include "third_party/skia/include/utils/SkEventTracer.h"
8 8
9 namespace skia { 9 namespace skia {
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION( 63 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(
64 categoryEnabledFlag, name, traceEventHandle); 64 categoryEnabledFlag, name, traceEventHandle);
65 } 65 }
66 66
67 } // namespace skia 67 } // namespace skia
68 68
69 69
70 void InitSkiaEventTracer() { 70 void InitSkiaEventTracer() {
71 // Initialize the binding to Skia's tracing events. Skia will 71 // Initialize the binding to Skia's tracing events. Skia will
72 // take ownership of and clean up the memory allocated here. 72 // take ownership of and clean up the memory allocated here.
73 SkEventTracer::SetInstance(new skia::SkChromiumEventTracer()); 73 if (!SkEventTracer::GetInstance())
74 SkEventTracer::SetInstance(new skia::SkChromiumEventTracer());
74 } 75 }
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698