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 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 * global font cache. | 143 * global font cache. |
144 */ | 144 */ |
145 static void SetTLSFontCacheLimit(size_t bytes); | 145 static void SetTLSFontCacheLimit(size_t bytes); |
146 | 146 |
147 typedef SkImageGenerator* (*ImageGeneratorFromEncodedFactory)(SkData*); | 147 typedef SkImageGenerator* (*ImageGeneratorFromEncodedFactory)(SkData*); |
148 | 148 |
149 /** | 149 /** |
150 * To instantiate images from encoded data, first looks at this runtime fun
ction-ptr. If it | 150 * To instantiate images from encoded data, first looks at this runtime fun
ction-ptr. If it |
151 * exists, it is called to create an SkImageGenerator from SkData. If there
is no function-ptr | 151 * exists, it is called to create an SkImageGenerator from SkData. If there
is no function-ptr |
152 * or there is, but it returns NULL, then skia will call its internal defau
lt implementation. | 152 * or there is, but it returns NULL, then skia will call its internal defau
lt implementation. |
| 153 * |
| 154 * Returns the previous factory (which could be NULL). |
153 */ | 155 */ |
154 static ImageGeneratorFromEncodedFactory GetImageGeneratorFromEncodedFactory(
); | 156 static ImageGeneratorFromEncodedFactory |
155 static void SetImageGeneratorFromEncodedFactory(ImageGeneratorFromEncodedFac
tory); | 157 SetImageGeneratorFromEncodedFactory(ImageGeneratorFromEncodedFactory)
; |
156 }; | 158 }; |
157 | 159 |
158 class SkAutoGraphics { | 160 class SkAutoGraphics { |
159 public: | 161 public: |
160 SkAutoGraphics() { | 162 SkAutoGraphics() { |
161 SkGraphics::Init(); | 163 SkGraphics::Init(); |
162 } | 164 } |
163 ~SkAutoGraphics() { | 165 ~SkAutoGraphics() { |
164 SkGraphics::Term(); | 166 SkGraphics::Term(); |
165 } | 167 } |
166 }; | 168 }; |
167 | 169 |
168 #endif | 170 #endif |
OLD | NEW |