| OLD | NEW |
| 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 #ifndef SkDynamicAnnotations_DEFINED | 8 #ifndef SkDynamicAnnotations_DEFINED |
| 9 #define SkDynamicAnnotations_DEFINED | 9 #define SkDynamicAnnotations_DEFINED |
| 10 | 10 |
| 11 // Make sure we see anything set via SkUserConfig.h (e.g. SK_DYNAMIC_ANNOTATIONS
_ENABLED). |
| 12 #include "SkTypes.h" |
| 13 |
| 11 // This file contains macros used to send out-of-band signals to dynamic instrum
entation systems, | 14 // This file contains macros used to send out-of-band signals to dynamic instrum
entation systems, |
| 12 // namely thread sanitizer. This is a cut-down version of the full dynamic_anno
tations library with | 15 // namely thread sanitizer. This is a cut-down version of the full dynamic_anno
tations library with |
| 13 // only the features used by Skia. | 16 // only the features used by Skia. |
| 14 | 17 |
| 15 #if SK_DYNAMIC_ANNOTATIONS_ENABLED | 18 #if SK_DYNAMIC_ANNOTATIONS_ENABLED |
| 16 | 19 |
| 17 extern "C" { | 20 extern "C" { |
| 18 // TSAN provides these hooks. | 21 // TSAN provides these hooks. |
| 19 void AnnotateIgnoreReadsBegin(const char* file, int line); | 22 void AnnotateIgnoreReadsBegin(const char* file, int line); |
| 20 void AnnotateIgnoreReadsEnd(const char* file, int line); | 23 void AnnotateIgnoreReadsEnd(const char* file, int line); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 SkTRacy& operator=(const T& val) { | 79 SkTRacy& operator=(const T& val) { |
| 77 SK_ANNOTATE_UNPROTECTED_WRITE(&fVal, val); | 80 SK_ANNOTATE_UNPROTECTED_WRITE(&fVal, val); |
| 78 return *this; | 81 return *this; |
| 79 } | 82 } |
| 80 | 83 |
| 81 private: | 84 private: |
| 82 T fVal; | 85 T fVal; |
| 83 }; | 86 }; |
| 84 | 87 |
| 85 #endif//SkDynamicAnnotations_DEFINED | 88 #endif//SkDynamicAnnotations_DEFINED |
| OLD | NEW |