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 SkScalerContext_DEFINED | 8 #ifndef SkScalerContext_DEFINED |
9 #define SkScalerContext_DEFINED | 9 #define SkScalerContext_DEFINED |
10 | 10 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 */ | 177 */ |
178 SkUnichar glyphIDToChar(uint16_t glyphID); | 178 SkUnichar glyphIDToChar(uint16_t glyphID); |
179 | 179 |
180 unsigned getGlyphCount() { return this->generateGlyphCount(); } | 180 unsigned getGlyphCount() { return this->generateGlyphCount(); } |
181 void getAdvance(SkGlyph*); | 181 void getAdvance(SkGlyph*); |
182 void getMetrics(SkGlyph*); | 182 void getMetrics(SkGlyph*); |
183 void getImage(const SkGlyph&); | 183 void getImage(const SkGlyph&); |
184 void getPath(const SkGlyph&, SkPath*); | 184 void getPath(const SkGlyph&, SkPath*); |
185 void getFontMetrics(SkPaint::FontMetrics*); | 185 void getFontMetrics(SkPaint::FontMetrics*); |
186 | 186 |
| 187 /** Return the size in bytes of the associated gamma lookup table |
| 188 */ |
| 189 static size_t GetGammaLUTSize(SkScalar contrast, SkScalar paintGamma, SkScal
ar deviceGamma, |
| 190 int* width, int* height); |
| 191 |
| 192 /** Get the associated gamma lookup table. The 'data' pointer must point to
pre-allocated |
| 193 memory, with size in bytes greater than or equal to the return value of
getGammaLUTSize(). |
| 194 */ |
| 195 static void GetGammaLUTData(SkScalar contrast, SkScalar paintGamma, SkScal
ar deviceGamma, |
| 196 void* data); |
| 197 |
187 #ifdef SK_BUILD_FOR_ANDROID | 198 #ifdef SK_BUILD_FOR_ANDROID |
188 unsigned getBaseGlyphCount(SkUnichar charCode); | 199 unsigned getBaseGlyphCount(SkUnichar charCode); |
189 | 200 |
190 // This function must be public for SkTypeface_android.h, but should not be | 201 // This function must be public for SkTypeface_android.h, but should not be |
191 // called by other callers | 202 // called by other callers |
192 SkFontID findTypefaceIdForChar(SkUnichar uni); | 203 SkFontID findTypefaceIdForChar(SkUnichar uni); |
193 #endif | 204 #endif |
194 | 205 |
195 static void MakeRec(const SkPaint&, const SkDeviceProperties* deviceProperti
es, | 206 static void MakeRec(const SkPaint&, const SkDeviceProperties* deviceProperti
es, |
196 const SkMatrix*, Rec* rec); | 207 const SkMatrix*, Rec* rec); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 return static_cast<SkPaint::Hinting>(hint); | 348 return static_cast<SkPaint::Hinting>(hint); |
338 } | 349 } |
339 | 350 |
340 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { | 351 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { |
341 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | | 352 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | |
342 (hinting << SkScalerContext::kHinting_Shift); | 353 (hinting << SkScalerContext::kHinting_Shift); |
343 } | 354 } |
344 | 355 |
345 | 356 |
346 #endif | 357 #endif |
OLD | NEW |