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, | 41 GrTextureParams::FilterMode filterMode, |
42 CoordsType = kLocal_CoordsType); | 42 CoordsType = kLocal_CoordsType); |
43 | 43 |
44 virtual ~GrTextureDomainEffect(); | 44 virtual ~GrTextureDomainEffect(); |
45 | 45 |
46 static const char* Name() { return "TextureDomain"; } | 46 static const char* Name() { return "TextureDomain"; } |
47 | 47 |
48 typedef GrGLTextureDomainEffect GLEffect; | 48 typedef GrGLTextureDomainEffect GLEffect; |
49 | 49 |
50 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE; | 50 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE; |
51 virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags
) const SK_OVERRIDE; | 51 virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags
) const SK_OVERRIDE; |
(...skipping 17 matching lines...) Expand all Loading... |
69 | 69 |
70 protected: | 70 protected: |
71 WrapMode fWrapMode; | 71 WrapMode fWrapMode; |
72 SkRect fTextureDomain; | 72 SkRect fTextureDomain; |
73 | 73 |
74 private: | 74 private: |
75 GrTextureDomainEffect(GrTexture*, | 75 GrTextureDomainEffect(GrTexture*, |
76 const SkMatrix&, | 76 const SkMatrix&, |
77 const SkRect& domain, | 77 const SkRect& domain, |
78 WrapMode, | 78 WrapMode, |
79 bool bilerp, | 79 GrTextureParams::FilterMode filterMode, |
80 CoordsType type); | 80 CoordsType type); |
81 | 81 |
82 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE; | 82 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE; |
83 | 83 |
84 GR_DECLARE_EFFECT_TEST; | 84 GR_DECLARE_EFFECT_TEST; |
85 | 85 |
86 typedef GrSingleTextureEffect INHERITED; | 86 typedef GrSingleTextureEffect INHERITED; |
87 }; | 87 }; |
88 | 88 |
89 #endif | 89 #endif |
OLD | NEW |