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

Side by Side Diff: src/core/SkScalerContext.h

Issue 258883002: Gamma correction for distance field text. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use the correct contrast value. Don't apply gamma to A8 unless necessary. Created 6 years, 6 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
OLDNEW
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
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 size_t getGammaLUTSize(SkScalar contrast, SkScalar paintGamma, SkScalar deviceGamma,
188 int* width, int* height);
189 void getGammaLUTData(SkScalar contrast, SkScalar paintGamma, SkScalar deviceGamma,
190 void* data);
191
187 #ifdef SK_BUILD_FOR_ANDROID 192 #ifdef SK_BUILD_FOR_ANDROID
188 unsigned getBaseGlyphCount(SkUnichar charCode); 193 unsigned getBaseGlyphCount(SkUnichar charCode);
189 194
190 // This function must be public for SkTypeface_android.h, but should not be 195 // This function must be public for SkTypeface_android.h, but should not be
191 // called by other callers 196 // called by other callers
192 SkFontID findTypefaceIdForChar(SkUnichar uni); 197 SkFontID findTypefaceIdForChar(SkUnichar uni);
193 #endif 198 #endif
194 199
195 static void MakeRec(const SkPaint&, const SkDeviceProperties* deviceProperti es, 200 static void MakeRec(const SkPaint&, const SkDeviceProperties* deviceProperti es,
196 const SkMatrix*, Rec* rec); 201 const SkMatrix*, Rec* rec);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 return static_cast<SkPaint::Hinting>(hint); 342 return static_cast<SkPaint::Hinting>(hint);
338 } 343 }
339 344
340 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { 345 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) {
341 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | 346 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) |
342 (hinting << SkScalerContext::kHinting_Shift); 347 (hinting << SkScalerContext::kHinting_Shift);
343 } 348 }
344 349
345 350
346 #endif 351 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698