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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 153 |
154 typedef GrSingleTextureEffect INHERITED; | 154 typedef GrSingleTextureEffect INHERITED; |
155 }; | 155 }; |
156 | 156 |
157 /** | 157 /** |
158 * A basic texture effect that uses GrTextureDomain. | 158 * A basic texture effect that uses GrTextureDomain. |
159 */ | 159 */ |
160 class GrTextureDomainEffect : public GrSingleTextureEffect { | 160 class GrTextureDomainEffect : public GrSingleTextureEffect { |
161 | 161 |
162 public: | 162 public: |
163 static GrFragmentProcessor* Create(GrTexture*, | 163 static const GrFragmentProcessor* Create(GrTexture*, |
164 const SkMatrix&, | 164 const SkMatrix&, |
165 const SkRect& domain, | 165 const SkRect& domain, |
166 GrTextureDomain::Mode, | 166 GrTextureDomain::Mode, |
167 GrTextureParams::FilterMode filterMode, | 167 GrTextureParams::FilterMode filterM
ode, |
168 GrCoordSet = kLocal_GrCoordSet); | 168 GrCoordSet = kLocal_GrCoordSet); |
169 | 169 |
170 virtual ~GrTextureDomainEffect(); | 170 virtual ~GrTextureDomainEffect(); |
171 | 171 |
172 const char* name() const override { return "TextureDomain"; } | 172 const char* name() const override { return "TextureDomain"; } |
173 | 173 |
174 const GrTextureDomain& textureDomain() const { return fTextureDomain; } | 174 const GrTextureDomain& textureDomain() const { return fTextureDomain; } |
175 | 175 |
176 protected: | 176 protected: |
177 GrTextureDomain fTextureDomain; | 177 GrTextureDomain fTextureDomain; |
178 | 178 |
(...skipping 12 matching lines...) Expand all Loading... |
191 bool onIsEqual(const GrFragmentProcessor&) const override; | 191 bool onIsEqual(const GrFragmentProcessor&) const override; |
192 | 192 |
193 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; | 193 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; |
194 | 194 |
195 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 195 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
196 | 196 |
197 typedef GrSingleTextureEffect INHERITED; | 197 typedef GrSingleTextureEffect INHERITED; |
198 }; | 198 }; |
199 | 199 |
200 #endif | 200 #endif |
OLD | NEW |