OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 GrSingleTextureEffect_DEFINED | 8 #ifndef GrSingleTextureEffect_DEFINED |
9 #define GrSingleTextureEffect_DEFINED | 9 #define GrSingleTextureEffect_DEFINED |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 const SkMatrix& getMatrix() const { return fMatrix; } | 24 const SkMatrix& getMatrix() const { return fMatrix; } |
25 | 25 |
26 /** Indicates whether the matrix operates on local coords or positions */ | 26 /** Indicates whether the matrix operates on local coords or positions */ |
27 CoordsType coordsType() const { return fCoordsType; } | 27 CoordsType coordsType() const { return fCoordsType; } |
28 | 28 |
29 protected: | 29 protected: |
30 /** unfiltered, clamp mode */ | 30 /** unfiltered, clamp mode */ |
31 GrSingleTextureEffect(GrTexture*, const SkMatrix&, CoordsType = kLocal_Coord
sType); | 31 GrSingleTextureEffect(GrTexture*, const SkMatrix&, CoordsType = kLocal_Coord
sType); |
32 /** clamp mode */ | 32 /** clamp mode */ |
33 GrSingleTextureEffect(GrTexture*, const SkMatrix&, bool bilerp, CoordsType =
kLocal_CoordsType); | 33 GrSingleTextureEffect(GrTexture*, const SkMatrix&, GrTextureParams::FilterMo
de filterMode, |
| 34 CoordsType = kLocal_CoordsType); |
34 GrSingleTextureEffect(GrTexture*, | 35 GrSingleTextureEffect(GrTexture*, |
35 const SkMatrix&, | 36 const SkMatrix&, |
36 const GrTextureParams&, | 37 const GrTextureParams&, |
37 CoordsType = kLocal_CoordsType); | 38 CoordsType = kLocal_CoordsType); |
38 | 39 |
39 /** | 40 /** |
40 * Helper for subclass onIsEqual() functions. | 41 * Helper for subclass onIsEqual() functions. |
41 */ | 42 */ |
42 bool hasSameTextureParamsMatrixAndCoordsType(const GrSingleTextureEffect& ot
her) const { | 43 bool hasSameTextureParamsMatrixAndCoordsType(const GrSingleTextureEffect& ot
her) const { |
43 const GrTextureAccess& otherAccess = other.fTextureAccess; | 44 const GrTextureAccess& otherAccess = other.fTextureAccess; |
(...skipping 20 matching lines...) Expand all Loading... |
64 | 65 |
65 private: | 66 private: |
66 GrTextureAccess fTextureAccess; | 67 GrTextureAccess fTextureAccess; |
67 SkMatrix fMatrix; | 68 SkMatrix fMatrix; |
68 CoordsType fCoordsType; | 69 CoordsType fCoordsType; |
69 | 70 |
70 typedef GrEffect INHERITED; | 71 typedef GrEffect INHERITED; |
71 }; | 72 }; |
72 | 73 |
73 #endif | 74 #endif |
OLD | NEW |