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

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

Issue 85653004: Move distance field font code into SkGpuDevice (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Clean up formatting and address nits Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkDraw.cpp ('k') | src/device/xps/SkXPSDevice.cpp » ('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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #ifndef SkDrawProcs_DEFINED 8 #ifndef SkDrawProcs_DEFINED
9 #define SkDrawProcs_DEFINED 9 #define SkDrawProcs_DEFINED
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 fBlitter->blitMask(mask, clip); 50 fBlitter->blitMask(mask, clip);
51 } 51 }
52 } 52 }
53 53
54 // mask must be kARGB32_Format 54 // mask must be kARGB32_Format
55 void blitMaskAsSprite(const SkMask& mask) const; 55 void blitMaskAsSprite(const SkMask& mask) const;
56 }; 56 };
57 57
58 struct SkDrawProcs { 58 struct SkDrawProcs {
59 SkDraw1Glyph::Proc fD1GProc; 59 SkDraw1Glyph::Proc fD1GProc;
60 #if SK_DISTANCEFIELD_FONTS
61 uint32_t fFlags;
62
63 enum Flags {
64 /**
65 * Disable baked glyph transforms
66 */
67 kSkipBakedGlyphTransform_Flag = 0x1,
68 /**
69 * Scale glyphs to get different point sizes
70 */
71 kUseScaledGlyphs_Flag = 0x2,
72 };
73
74 static const int kBaseDFFontSize = 32;
75 #endif
76 }; 60 };
77 61
78 bool SkDrawTreatAAStrokeAsHairline(SkScalar strokeWidth, const SkMatrix&, 62 bool SkDrawTreatAAStrokeAsHairline(SkScalar strokeWidth, const SkMatrix&,
79 SkScalar* coverage); 63 SkScalar* coverage);
80 64
81 /** 65 /**
82 * If the current paint is set to stroke and the stroke-width when applied to 66 * If the current paint is set to stroke and the stroke-width when applied to
83 * the matrix is <= 1.0, then this returns true, and sets coverage (simulating 67 * the matrix is <= 1.0, then this returns true, and sets coverage (simulating
84 * a stroke by drawing a hairline with partial coverage). If any of these 68 * a stroke by drawing a hairline with partial coverage). If any of these
85 * conditions are false, then this returns false and coverage is ignored. 69 * conditions are false, then this returns false and coverage is ignored.
(...skipping 11 matching lines...) Expand all
97 } 81 }
98 82
99 if (!paint.isAntiAlias()) { 83 if (!paint.isAntiAlias()) {
100 return false; 84 return false;
101 } 85 }
102 86
103 return SkDrawTreatAAStrokeAsHairline(strokeWidth, matrix, coverage); 87 return SkDrawTreatAAStrokeAsHairline(strokeWidth, matrix, coverage);
104 } 88 }
105 89
106 #endif 90 #endif
OLDNEW
« no previous file with comments | « src/core/SkDraw.cpp ('k') | src/device/xps/SkXPSDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698