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

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: add CheapMix helper" Created 5 years, 10 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/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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 */ 236 */
237 static void GetGammaLUTData(SkScalar contrast, SkScalar paintGamma, SkScal ar deviceGamma, 237 static void GetGammaLUTData(SkScalar contrast, SkScalar paintGamma, SkScal ar deviceGamma,
238 void* data); 238 void* data);
239 239
240 static void MakeRec(const SkPaint&, const SkDeviceProperties* deviceProperti es, 240 static void MakeRec(const SkPaint&, const SkDeviceProperties* deviceProperti es,
241 const SkMatrix*, Rec* rec); 241 const SkMatrix*, Rec* rec);
242 static inline void PostMakeRec(const SkPaint&, Rec*); 242 static inline void PostMakeRec(const SkPaint&, Rec*);
243 243
244 static SkMaskGamma::PreBlend GetMaskPreBlend(const Rec& rec); 244 static SkMaskGamma::PreBlend GetMaskPreBlend(const Rec& rec);
245 245
246 const Rec& getRec() const { return fRec; }
247
246 protected: 248 protected:
247 Rec fRec; 249 Rec fRec;
248 250
249 /** Generates the contents of glyph.fAdvanceX and glyph.fAdvanceY. 251 /** Generates the contents of glyph.fAdvanceX and glyph.fAdvanceY.
250 * May call getMetrics if that would be just as fast. 252 * May call getMetrics if that would be just as fast.
251 */ 253 */
252 virtual void generateAdvance(SkGlyph* glyph) = 0; 254 virtual void generateAdvance(SkGlyph* glyph) = 0;
253 255
254 /** Generates the contents of glyph.fWidth, fHeight, fTop, fLeft, 256 /** Generates the contents of glyph.fWidth, fHeight, fTop, fLeft,
255 * as well as fAdvanceX and fAdvanceY if not already set. 257 * as well as fAdvanceX and fAdvanceY if not already set.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 return static_cast<SkPaint::Hinting>(hint); 359 return static_cast<SkPaint::Hinting>(hint);
358 } 360 }
359 361
360 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { 362 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) {
361 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | 363 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) |
362 (hinting << SkScalerContext::kHinting_Shift); 364 (hinting << SkScalerContext::kHinting_Shift);
363 } 365 }
364 366
365 367
366 #endif 368 #endif
OLDNEW
« no previous file with comments | « src/core/SkGlyphCache.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698