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 GrDistanceFieldTextureEffect_DEFINED | 8 #ifndef GrDistanceFieldTextureEffect_DEFINED |
9 #define GrDistanceFieldTextureEffect_DEFINED | 9 #define GrDistanceFieldTextureEffect_DEFINED |
10 | 10 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 GrTextureAccess fTextureAccess; | 80 GrTextureAccess fTextureAccess; |
81 #ifdef SK_GAMMA_APPLY_TO_A8 | 81 #ifdef SK_GAMMA_APPLY_TO_A8 |
82 GrTextureAccess fGammaTextureAccess; | 82 GrTextureAccess fGammaTextureAccess; |
83 float fLuminance; | 83 float fLuminance; |
84 #endif | 84 #endif |
85 uint32_t fFlags; | 85 uint32_t fFlags; |
86 | 86 |
87 GR_DECLARE_EFFECT_TEST; | 87 GR_DECLARE_EFFECT_TEST; |
88 | 88 |
89 typedef GrVertexEffect INHERITED; | 89 typedef GrEffect INHERITED; |
90 }; | 90 }; |
91 | 91 |
92 /** | 92 /** |
93 * The output color of this effect is a modulation of the input color and sample
s from a | 93 * The output color of this effect is a modulation of the input color and sample
s from a |
94 * distance field texture (using a smoothed step function near 0.5), adjusted fo
r LCD displays. | 94 * distance field texture (using a smoothed step function near 0.5), adjusted fo
r LCD displays. |
95 * It allows explicit specification of the filtering and wrap modes (GrTexturePa
rams). The input | 95 * It allows explicit specification of the filtering and wrap modes (GrTexturePa
rams). The input |
96 * coords are a custom attribute. Gamma correction is handled via a texture LUT. | 96 * coords are a custom attribute. Gamma correction is handled via a texture LUT. |
97 */ | 97 */ |
98 class GrDistanceFieldLCDTextureEffect : public GrVertexEffect { | 98 class GrDistanceFieldLCDTextureEffect : public GrVertexEffect { |
99 public: | 99 public: |
(...skipping 24 matching lines...) Expand all Loading... |
124 | 124 |
125 virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE; | 125 virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE; |
126 | 126 |
127 GrTextureAccess fTextureAccess; | 127 GrTextureAccess fTextureAccess; |
128 GrTextureAccess fGammaTextureAccess; | 128 GrTextureAccess fGammaTextureAccess; |
129 GrColor fTextColor; | 129 GrColor fTextColor; |
130 uint32_t fFlags; | 130 uint32_t fFlags; |
131 | 131 |
132 GR_DECLARE_EFFECT_TEST; | 132 GR_DECLARE_EFFECT_TEST; |
133 | 133 |
134 typedef GrVertexEffect INHERITED; | 134 typedef GrEffect INHERITED; |
135 }; | 135 }; |
136 | 136 |
137 #endif | 137 #endif |
OLD | NEW |