| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 filterM
ode, |
| 171 GrCoordSet = kLocal_GrCoordSet); | 171 GrCoordSet = kLocal_GrCoordSet); |
| 172 | 172 |
| 173 virtual ~GrTextureDomainEffect(); | 173 virtual ~GrTextureDomainEffect(); |
| 174 | 174 |
| 175 const char* name() const override { return "TextureDomain"; } | 175 const char* name() const override { return "TextureDomain"; } |
| 176 | 176 |
| 177 SkString dumpInfo() const override { |
| 178 SkString str; |
| 179 str.appendf("Domain: [L: %.2f, T: %.2f, R: %.2f, B: %.2f] ", |
| 180 fTextureDomain.domain().fLeft, fTextureDomain.domain().fTop, |
| 181 fTextureDomain.domain().fRight, fTextureDomain.domain().fBot
tom); |
| 182 str.append(INHERITED::dumpInfo()); |
| 183 return str; |
| 184 } |
| 185 |
| 177 const GrTextureDomain& textureDomain() const { return fTextureDomain; } | 186 const GrTextureDomain& textureDomain() const { return fTextureDomain; } |
| 178 | 187 |
| 179 protected: | 188 protected: |
| 180 GrTextureDomain fTextureDomain; | 189 GrTextureDomain fTextureDomain; |
| 181 | 190 |
| 182 private: | 191 private: |
| 183 GrTextureDomainEffect(GrTexture*, | 192 GrTextureDomainEffect(GrTexture*, |
| 184 const SkMatrix&, | 193 const SkMatrix&, |
| 185 const SkRect& domain, | 194 const SkRect& domain, |
| 186 GrTextureDomain::Mode, | 195 GrTextureDomain::Mode, |
| 187 GrTextureParams::FilterMode, | 196 GrTextureParams::FilterMode, |
| 188 GrCoordSet); | 197 GrCoordSet); |
| 189 | 198 |
| 190 GrGLFragmentProcessor* onCreateGLInstance() const override; | 199 GrGLFragmentProcessor* onCreateGLInstance() const override; |
| 191 | 200 |
| 192 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov
erride; | 201 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov
erride; |
| 193 | 202 |
| 194 bool onIsEqual(const GrFragmentProcessor&) const override; | 203 bool onIsEqual(const GrFragmentProcessor&) const override; |
| 195 | 204 |
| 196 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; | 205 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; |
| 197 | 206 |
| 198 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 207 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
| 199 | 208 |
| 200 typedef GrSingleTextureEffect INHERITED; | 209 typedef GrSingleTextureEffect INHERITED; |
| 201 }; | 210 }; |
| 202 | 211 |
| 203 #endif | 212 #endif |
| OLD | NEW |