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

Side by Side Diff: src/utils/SkEventTracer.cpp

Issue 1369333004: Move SkAtomics.h to private. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « src/image/SkImage_Gpu.h ('k') | src/views/SkOSMenu.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
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 #include "SkAtomics.h" 8 #include "../private/SkAtomics.h"
9 #include "SkEventTracer.h" 9 #include "SkEventTracer.h"
10 #include "SkOncePtr.h" 10 #include "SkOncePtr.h"
11 11
12 #include <stdlib.h> 12 #include <stdlib.h>
13 13
14 class SkDefaultEventTracer : public SkEventTracer { 14 class SkDefaultEventTracer : public SkEventTracer {
15 SkEventTracer::Handle 15 SkEventTracer::Handle
16 addTraceEvent(char phase, 16 addTraceEvent(char phase,
17 const uint8_t* categoryEnabledFlag, 17 const uint8_t* categoryEnabledFlag,
18 const char* name, 18 const char* name,
(...skipping 30 matching lines...) Expand all
49 // An atomic load during process shutdown is probably overkill, but safe ove rkill. 49 // An atomic load during process shutdown is probably overkill, but safe ove rkill.
50 atexit([]() { delete sk_atomic_load(&gUserTracer, sk_memory_order_acquire); }); 50 atexit([]() { delete sk_atomic_load(&gUserTracer, sk_memory_order_acquire); });
51 } 51 }
52 52
53 SkEventTracer* SkEventTracer::GetInstance() { 53 SkEventTracer* SkEventTracer::GetInstance() {
54 if (SkEventTracer* tracer = sk_atomic_load(&gUserTracer, sk_memory_order_acq uire)) { 54 if (SkEventTracer* tracer = sk_atomic_load(&gUserTracer, sk_memory_order_acq uire)) {
55 return tracer; 55 return tracer;
56 } 56 }
57 return gDefaultTracer.get([]{ return new SkDefaultEventTracer; }); 57 return gDefaultTracer.get([]{ return new SkDefaultEventTracer; });
58 } 58 }
OLDNEW
« no previous file with comments | « src/image/SkImage_Gpu.h ('k') | src/views/SkOSMenu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698