| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 public: | 146 public: |
| 147 static GrFragmentProcessor* Create(GrTexture*, | 147 static GrFragmentProcessor* Create(GrTexture*, |
| 148 const SkMatrix&, | 148 const SkMatrix&, |
| 149 const SkRect& domain, | 149 const SkRect& domain, |
| 150 GrTextureDomain::Mode, | 150 GrTextureDomain::Mode, |
| 151 GrTextureParams::FilterMode filterMode, | 151 GrTextureParams::FilterMode filterMode, |
| 152 GrCoordSet = kLocal_GrCoordSet); | 152 GrCoordSet = kLocal_GrCoordSet); |
| 153 | 153 |
| 154 virtual ~GrTextureDomainEffect(); | 154 virtual ~GrTextureDomainEffect(); |
| 155 | 155 |
| 156 virtual const char* name() const SK_OVERRIDE { return "TextureDomain"; } | 156 const char* name() const SK_OVERRIDE { return "TextureDomain"; } |
| 157 | 157 |
| 158 virtual void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) cons
t SK_OVERRIDE; | 158 void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVE
RRIDE; |
| 159 | 159 |
| 160 virtual GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; | 160 GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; |
| 161 | 161 |
| 162 const GrTextureDomain& textureDomain() const { return fTextureDomain; } | 162 const GrTextureDomain& textureDomain() const { return fTextureDomain; } |
| 163 | 163 |
| 164 protected: | 164 protected: |
| 165 GrTextureDomain fTextureDomain; | 165 GrTextureDomain fTextureDomain; |
| 166 | 166 |
| 167 private: | 167 private: |
| 168 GrTextureDomainEffect(GrTexture*, | 168 GrTextureDomainEffect(GrTexture*, |
| 169 const SkMatrix&, | 169 const SkMatrix&, |
| 170 const SkRect& domain, | 170 const SkRect& domain, |
| 171 GrTextureDomain::Mode, | 171 GrTextureDomain::Mode, |
| 172 GrTextureParams::FilterMode, | 172 GrTextureParams::FilterMode, |
| 173 GrCoordSet); | 173 GrCoordSet); |
| 174 | 174 |
| 175 virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; | 175 bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; |
| 176 | 176 |
| 177 virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVE
RRIDE; | 177 void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; |
| 178 | 178 |
| 179 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 179 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
| 180 | 180 |
| 181 typedef GrSingleTextureEffect INHERITED; | 181 typedef GrSingleTextureEffect INHERITED; |
| 182 }; | 182 }; |
| 183 | 183 |
| 184 #endif | 184 #endif |
| OLD | NEW |