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 GrTextureDomainEffect_DEFINED | 8 #ifndef GrTextureDomainEffect_DEFINED |
9 #define GrTextureDomainEffect_DEFINED | 9 #define GrTextureDomainEffect_DEFINED |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 */ | 31 */ |
32 enum WrapMode { | 32 enum WrapMode { |
33 kClamp_WrapMode, | 33 kClamp_WrapMode, |
34 kDecal_WrapMode, | 34 kDecal_WrapMode, |
35 }; | 35 }; |
36 | 36 |
37 static GrEffectRef* Create(GrTexture*, | 37 static GrEffectRef* Create(GrTexture*, |
38 const SkMatrix&, | 38 const SkMatrix&, |
39 const SkRect& domain, | 39 const SkRect& domain, |
40 WrapMode, | 40 WrapMode, |
41 bool bilerp = false); | 41 bool bilerp, |
| 42 CoordsType = kLocal_CoordsType); |
42 | 43 |
43 virtual ~GrTextureDomainEffect(); | 44 virtual ~GrTextureDomainEffect(); |
44 | 45 |
45 static const char* Name() { return "TextureDomain"; } | 46 static const char* Name() { return "TextureDomain"; } |
46 | 47 |
47 typedef GrGLTextureDomainEffect GLEffect; | 48 typedef GrGLTextureDomainEffect GLEffect; |
48 | 49 |
49 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE; | 50 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE; |
50 virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags
) const SK_OVERRIDE; | 51 virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags
) const SK_OVERRIDE; |
51 | 52 |
(...skipping 16 matching lines...) Expand all Loading... |
68 | 69 |
69 protected: | 70 protected: |
70 WrapMode fWrapMode; | 71 WrapMode fWrapMode; |
71 SkRect fTextureDomain; | 72 SkRect fTextureDomain; |
72 | 73 |
73 private: | 74 private: |
74 GrTextureDomainEffect(GrTexture*, | 75 GrTextureDomainEffect(GrTexture*, |
75 const SkMatrix&, | 76 const SkMatrix&, |
76 const GrRect& domain, | 77 const GrRect& domain, |
77 WrapMode, | 78 WrapMode, |
78 bool bilerp); | 79 bool bilerp, |
| 80 CoordsType type); |
79 | 81 |
80 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE; | 82 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE; |
81 | 83 |
82 GR_DECLARE_EFFECT_TEST; | 84 GR_DECLARE_EFFECT_TEST; |
83 | 85 |
84 typedef GrSingleTextureEffect INHERITED; | 86 typedef GrSingleTextureEffect INHERITED; |
85 }; | 87 }; |
86 | 88 |
87 #endif | 89 #endif |
OLD | NEW |