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

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

Issue 323513005: Revert of Gamma correction for distance field text. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/gpu/GrDistanceFieldTextContext.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 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
198 #ifdef SK_BUILD_FOR_ANDROID 187 #ifdef SK_BUILD_FOR_ANDROID
199 unsigned getBaseGlyphCount(SkUnichar charCode); 188 unsigned getBaseGlyphCount(SkUnichar charCode);
200 189
201 // This function must be public for SkTypeface_android.h, but should not be 190 // This function must be public for SkTypeface_android.h, but should not be
202 // called by other callers 191 // called by other callers
203 SkFontID findTypefaceIdForChar(SkUnichar uni); 192 SkFontID findTypefaceIdForChar(SkUnichar uni);
204 #endif 193 #endif
205 194
206 static void MakeRec(const SkPaint&, const SkDeviceProperties* deviceProperti es, 195 static void MakeRec(const SkPaint&, const SkDeviceProperties* deviceProperti es,
207 const SkMatrix*, Rec* rec); 196 const SkMatrix*, Rec* rec);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 return static_cast<SkPaint::Hinting>(hint); 337 return static_cast<SkPaint::Hinting>(hint);
349 } 338 }
350 339
351 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { 340 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) {
352 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | 341 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) |
353 (hinting << SkScalerContext::kHinting_Shift); 342 (hinting << SkScalerContext::kHinting_Shift);
354 } 343 }
355 344
356 345
357 #endif 346 #endif
OLDNEW
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/gpu/GrDistanceFieldTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698