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

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

Issue 877113002: use murmur3 finisher to improve font hash efficiency (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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
« src/core/SkGlyphCache.cpp ('K') | « src/core/SkGlyphCache.cpp ('k') | no next file » | 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 */ 238 */
239 static void GetGammaLUTData(SkScalar contrast, SkScalar paintGamma, SkScal ar deviceGamma, 239 static void GetGammaLUTData(SkScalar contrast, SkScalar paintGamma, SkScal ar deviceGamma,
240 void* data); 240 void* data);
241 241
242 static void MakeRec(const SkPaint&, const SkDeviceProperties* deviceProperti es, 242 static void MakeRec(const SkPaint&, const SkDeviceProperties* deviceProperti es,
243 const SkMatrix*, Rec* rec); 243 const SkMatrix*, Rec* rec);
244 static inline void PostMakeRec(const SkPaint&, Rec*); 244 static inline void PostMakeRec(const SkPaint&, Rec*);
245 245
246 static SkMaskGamma::PreBlend GetMaskPreBlend(const Rec& rec); 246 static SkMaskGamma::PreBlend GetMaskPreBlend(const Rec& rec);
247 247
248 const Rec& getRec() const { return fRec; }
249
248 protected: 250 protected:
249 Rec fRec; 251 Rec fRec;
250 252
251 /** Generates the contents of glyph.fAdvanceX and glyph.fAdvanceY. 253 /** Generates the contents of glyph.fAdvanceX and glyph.fAdvanceY.
252 * May call getMetrics if that would be just as fast. 254 * May call getMetrics if that would be just as fast.
253 */ 255 */
254 virtual void generateAdvance(SkGlyph* glyph) = 0; 256 virtual void generateAdvance(SkGlyph* glyph) = 0;
255 257
256 /** Generates the contents of glyph.fWidth, fHeight, fTop, fLeft, 258 /** Generates the contents of glyph.fWidth, fHeight, fTop, fLeft,
257 * as well as fAdvanceX and fAdvanceY if not already set. 259 * as well as fAdvanceX and fAdvanceY if not already set.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 return static_cast<SkPaint::Hinting>(hint); 361 return static_cast<SkPaint::Hinting>(hint);
360 } 362 }
361 363
362 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { 364 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) {
363 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | 365 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) |
364 (hinting << SkScalerContext::kHinting_Shift); 366 (hinting << SkScalerContext::kHinting_Shift);
365 } 367 }
366 368
367 369
368 #endif 370 #endif
OLDNEW
« src/core/SkGlyphCache.cpp ('K') | « src/core/SkGlyphCache.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698