OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
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 GrDistanceFieldGeoProc_DEFINED | 8 #ifndef GrDistanceFieldGeoProc_DEFINED |
9 #define GrDistanceFieldGeoProc_DEFINED | 9 #define GrDistanceFieldGeoProc_DEFINED |
10 | 10 |
11 #include "GrProcessor.h" | 11 #include "GrProcessor.h" |
12 #include "GrGeometryProcessor.h" | 12 #include "GrGeometryProcessor.h" |
13 | 13 |
14 class GrGLDistanceFieldA8TextGeoProc; | 14 class GrGLDistanceFieldA8TextGeoProc; |
15 class GrGLDistanceFieldPathGeoProc; | 15 class GrGLDistanceFieldPathGeoProc; |
16 class GrGLDistanceFieldLCDTextGeoProc; | 16 class GrGLDistanceFieldLCDTextGeoProc; |
17 class GrInvariantOutput; | 17 class GrInvariantOutput; |
18 | 18 |
19 enum GrDistanceFieldEffectFlags { | 19 enum GrDistanceFieldEffectFlags { |
20 kSimilarity_DistanceFieldEffectFlag = 0x01, // ctm is similarity matrix | 20 kSimilarity_DistanceFieldEffectFlag = 0x01, // ctm is similarity matrix |
21 kScaleOnly_DistanceFieldEffectFlag = 0x02, // ctm has only scale and tran
slate | 21 kScaleOnly_DistanceFieldEffectFlag = 0x02, // ctm has only scale and tran
slate |
22 kUseLCD_DistanceFieldEffectFlag = 0x04, // use lcd text | 22 kUseLCD_DistanceFieldEffectFlag = 0x04, // use lcd text |
23 kBGR_DistanceFieldEffectFlag = 0x08, // lcd display has bgr order | 23 kBGR_DistanceFieldEffectFlag = 0x08, // lcd display has bgr order |
24 kPortrait_DistanceFieldEffectFlag = 0x10, // lcd display is in portrait
mode (not used yet) | 24 kPortrait_DistanceFieldEffectFlag = 0x10, // lcd display is in portrait
mode (not used yet) |
25 | 25 |
26 kInvalid_DistanceFieldEffectFlag = 0x80, // invalid state (for initiali
zation) | 26 kInvalid_DistanceFieldEffectFlag = 0x80, // invalid state (for initiali
zation) |
27 | 27 |
28 kUniformScale_DistanceFieldEffectMask = kSimilarity_DistanceFieldEffectFlag
| | 28 kUniformScale_DistanceFieldEffectMask = kSimilarity_DistanceFieldEffectFlag
| |
29 kScaleOnly_DistanceFieldEffectFlag, | 29 kScaleOnly_DistanceFieldEffectFlag, |
30 // The subset of the flags relevant to GrDistanceFieldA8TextGeoProc | 30 // The subset of the flags relevant to GrDistanceFieldA8TextGeoProc |
31 kNonLCD_DistanceFieldEffectMask = kSimilarity_DistanceFieldEffectFlag
| | 31 kNonLCD_DistanceFieldEffectMask = kSimilarity_DistanceFieldEffectFlag
| |
32 kScaleOnly_DistanceFieldEffectFlag, | 32 kScaleOnly_DistanceFieldEffectFlag, |
33 // The subset of the flags relevant to GrDistanceFieldLCDTextGeoProc | 33 // The subset of the flags relevant to GrDistanceFieldLCDTextGeoProc |
34 kLCD_DistanceFieldEffectMask = kSimilarity_DistanceFieldEffectFlag
| | 34 kLCD_DistanceFieldEffectMask = kSimilarity_DistanceFieldEffectFlag
| |
35 kScaleOnly_DistanceFieldEffectFlag | | 35 kScaleOnly_DistanceFieldEffectFlag | |
36 kUseLCD_DistanceFieldEffectFlag | | 36 kUseLCD_DistanceFieldEffectFlag | |
37 kBGR_DistanceFieldEffectFlag, | 37 kBGR_DistanceFieldEffectFlag, |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 const Attribute* fInColor; | 222 const Attribute* fInColor; |
223 const Attribute* fInTextureCoords; | 223 const Attribute* fInTextureCoords; |
224 bool fUsesLocalCoords; | 224 bool fUsesLocalCoords; |
225 | 225 |
226 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; | 226 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
227 | 227 |
228 typedef GrGeometryProcessor INHERITED; | 228 typedef GrGeometryProcessor INHERITED; |
229 }; | 229 }; |
230 | 230 |
231 #endif | 231 #endif |
OLD | NEW |