OLD | NEW |
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 Loading... |
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 uint32_t fFlags; |
| 61 |
| 62 enum Flags { |
| 63 /** |
| 64 * Disable baked glyph transforms |
| 65 */ |
| 66 kSkipBakedGlyphTransform_Flag = 0x1, |
| 67 /** |
| 68 * Scale glyphs to get different point sizes |
| 69 */ |
| 70 kUseScaledGlyphs_Flag = 0x2, |
| 71 }; |
60 }; | 72 }; |
61 | 73 |
62 /** | 74 /** |
63 * If the current paint is set to stroke and the stroke-width when applied to | 75 * If the current paint is set to stroke and the stroke-width when applied to |
64 * the matrix is <= 1.0, then this returns true, and sets coverage (simulating | 76 * the matrix is <= 1.0, then this returns true, and sets coverage (simulating |
65 * a stroke by drawing a hairline with partial coverage). If any of these | 77 * a stroke by drawing a hairline with partial coverage). If any of these |
66 * conditions are false, then this returns false and coverage is ignored. | 78 * conditions are false, then this returns false and coverage is ignored. |
67 */ | 79 */ |
68 bool SkDrawTreatAsHairline(const SkPaint&, const SkMatrix&, SkScalar* coverage); | 80 bool SkDrawTreatAsHairline(const SkPaint&, const SkMatrix&, SkScalar* coverage); |
69 | 81 |
70 #endif | 82 #endif |
OLD | NEW |