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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 typedef GrSingleTextureEffect INHERITED; | 157 typedef GrSingleTextureEffect INHERITED; |
158 }; | 158 }; |
159 | 159 |
160 /** | 160 /** |
161 * A basic texture effect that uses GrTextureDomain. | 161 * A basic texture effect that uses GrTextureDomain. |
162 */ | 162 */ |
163 class GrTextureDomainEffect : public GrSingleTextureEffect { | 163 class GrTextureDomainEffect : public GrSingleTextureEffect { |
164 | 164 |
165 public: | 165 public: |
166 static const GrFragmentProcessor* Create(GrTexture*, | 166 static const GrFragmentProcessor* Create(GrTexture*, |
167 const SkMatrix&, | 167 const SkMatrix&, |
168 const SkRect& domain, | 168 const SkRect& domain, |
169 GrTextureDomain::Mode, | 169 GrTextureDomain::Mode, |
170 GrTextureParams::FilterMode filterM
ode, | 170 GrTextureParams::FilterMode filterMode, |
171 GrCoordSet = kLocal_GrCoordSet); | 171 GrCoordSet, //= kLocal_GrCoordSet, |
| 172 GrRenderTarget* dst); |
172 | 173 |
173 virtual ~GrTextureDomainEffect(); | 174 virtual ~GrTextureDomainEffect(); |
174 | 175 |
175 const char* name() const override { return "TextureDomain"; } | 176 const char* name() const override { return "TextureDomain"; } |
176 | 177 |
177 const GrTextureDomain& textureDomain() const { return fTextureDomain; } | 178 const GrTextureDomain& textureDomain() const { return fTextureDomain; } |
178 | 179 |
179 protected: | 180 protected: |
180 GrTextureDomain fTextureDomain; | 181 GrTextureDomain fTextureDomain; |
181 | 182 |
182 private: | 183 private: |
183 GrTextureDomainEffect(GrTexture*, | 184 GrTextureDomainEffect(GrTexture*, |
184 const SkMatrix&, | 185 const SkMatrix&, |
185 const SkRect& domain, | 186 const SkRect& domain, |
186 GrTextureDomain::Mode, | 187 GrTextureDomain::Mode, |
187 GrTextureParams::FilterMode, | 188 GrTextureParams::FilterMode, |
188 GrCoordSet); | 189 GrCoordSet, GrRenderTarget* dst); |
189 | 190 |
190 GrGLFragmentProcessor* onCreateGLInstance() const override; | 191 GrGLFragmentProcessor* onCreateGLInstance() const override; |
191 | 192 |
192 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov
erride; | 193 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov
erride; |
193 | 194 |
194 bool onIsEqual(const GrFragmentProcessor&) const override; | 195 bool onIsEqual(const GrFragmentProcessor&) const override; |
195 | 196 |
196 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; | 197 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; |
197 | 198 |
198 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 199 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
199 | 200 |
200 typedef GrSingleTextureEffect INHERITED; | 201 typedef GrSingleTextureEffect INHERITED; |
201 }; | 202 }; |
202 | 203 |
203 #endif | 204 #endif |
OLD | NEW |