| 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(GrProcessorDataManager*, | 163 static GrFragmentProcessor* Create(GrTexture*, |
| 164 GrTexture*, | |
| 165 const SkMatrix&, | 164 const SkMatrix&, |
| 166 const SkRect& domain, | 165 const SkRect& domain, |
| 167 GrTextureDomain::Mode, | 166 GrTextureDomain::Mode, |
| 168 GrTextureParams::FilterMode filterMode, | 167 GrTextureParams::FilterMode filterMode, |
| 169 GrCoordSet = kLocal_GrCoordSet); | 168 GrCoordSet = kLocal_GrCoordSet); |
| 170 | 169 |
| 171 virtual ~GrTextureDomainEffect(); | 170 virtual ~GrTextureDomainEffect(); |
| 172 | 171 |
| 173 const char* name() const override { return "TextureDomain"; } | 172 const char* name() const override { return "TextureDomain"; } |
| 174 | 173 |
| 175 const GrTextureDomain& textureDomain() const { return fTextureDomain; } | 174 const GrTextureDomain& textureDomain() const { return fTextureDomain; } |
| 176 | 175 |
| 177 protected: | 176 protected: |
| 178 GrTextureDomain fTextureDomain; | 177 GrTextureDomain fTextureDomain; |
| 179 | 178 |
| 180 private: | 179 private: |
| 181 GrTextureDomainEffect(GrProcessorDataManager*, | 180 GrTextureDomainEffect(GrTexture*, |
| 182 GrTexture*, | |
| 183 const SkMatrix&, | 181 const SkMatrix&, |
| 184 const SkRect& domain, | 182 const SkRect& domain, |
| 185 GrTextureDomain::Mode, | 183 GrTextureDomain::Mode, |
| 186 GrTextureParams::FilterMode, | 184 GrTextureParams::FilterMode, |
| 187 GrCoordSet); | 185 GrCoordSet); |
| 188 | 186 |
| 189 GrGLFragmentProcessor* onCreateGLInstance() const override; | 187 GrGLFragmentProcessor* onCreateGLInstance() const override; |
| 190 | 188 |
| 191 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov
erride; | 189 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov
erride; |
| 192 | 190 |
| 193 bool onIsEqual(const GrFragmentProcessor&) const override; | 191 bool onIsEqual(const GrFragmentProcessor&) const override; |
| 194 | 192 |
| 195 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; | 193 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; |
| 196 | 194 |
| 197 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 195 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
| 198 | 196 |
| 199 typedef GrSingleTextureEffect INHERITED; | 197 typedef GrSingleTextureEffect INHERITED; |
| 200 }; | 198 }; |
| 201 | 199 |
| 202 #endif | 200 #endif |
| OLD | NEW |