| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 SkGraphics_DEFINED | 8 #ifndef SkGraphics_DEFINED |
| 9 #define SkGraphics_DEFINED | 9 #define SkGraphics_DEFINED |
| 10 | 10 |
| 11 #include "SkTypes.h" | 11 #include "SkTypes.h" |
| 12 | 12 |
| 13 class SkData; | 13 class SkData; |
| 14 class SkImageGenerator; | 14 class SkImageGenerator; |
| 15 | 15 |
| 16 class SK_API SkGraphics { | 16 class SK_API SkGraphics { |
| 17 public: | 17 public: |
| 18 /** | 18 /** |
| 19 * Call this at process initialization time if your environment does not | 19 * Call this at process initialization time if your environment does not |
| 20 * permit static global initializers that execute code. Note that | 20 * permit static global initializers that execute code. |
| 21 * Init() is not thread-safe. | 21 * Init() is thread-safe and idempotent. |
| 22 */ | 22 */ |
| 23 static void Init(); | 23 static void Init(); |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * Call this to release any memory held privately, such as the font cache. | 26 * Call this to release any memory held privately, such as the font cache. |
| 27 */ | 27 */ |
| 28 static void Term(); | 28 static void Term(); |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * Return the version numbers for the library. If the parameter is not | 31 * Return the version numbers for the library. If the parameter is not |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 public: | 161 public: |
| 162 SkAutoGraphics() { | 162 SkAutoGraphics() { |
| 163 SkGraphics::Init(); | 163 SkGraphics::Init(); |
| 164 } | 164 } |
| 165 ~SkAutoGraphics() { | 165 ~SkAutoGraphics() { |
| 166 SkGraphics::Term(); | 166 SkGraphics::Term(); |
| 167 } | 167 } |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 #endif | 170 #endif |
| OLD | NEW |