| 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 |
| 11 #include "GrSingleTextureEffect.h" | 11 #include "GrSingleTextureEffect.h" |
| 12 #include "gl/GrGLProcessor.h" | 12 #include "gl/GrGLProcessor.h" |
| 13 | 13 |
| 14 class GrGLProgramBuilder; | 14 class GrGLProgramBuilder; |
| 15 class GrGLShaderBuilder; | 15 class GrGLShaderBuilder; |
| 16 class GrInvariantOutput; |
| 16 struct SkRect; | 17 struct SkRect; |
| 17 | 18 |
| 18 /** | 19 /** |
| 19 * Limits a texture's lookup coordinates to a domain. Samples outside the domain
are either clamped | 20 * Limits a texture's lookup coordinates to a domain. Samples outside the domain
are either clamped |
| 20 * the edge of the domain or result in a vec4 of zeros (decal mode). The domain
is clipped to | 21 * the edge of the domain or result in a vec4 of zeros (decal mode). The domain
is clipped to |
| 21 * normalized texture coords ([0,1]x[0,1] square). Bilinear filtering can cause
texels outside the | 22 * normalized texture coords ([0,1]x[0,1] square). Bilinear filtering can cause
texels outside the |
| 22 * domain to affect the read value unless the caller considers this when calcula
ting the domain. | 23 * domain to affect the read value unless the caller considers this when calcula
ting the domain. |
| 23 */ | 24 */ |
| 24 class GrTextureDomain { | 25 class GrTextureDomain { |
| 25 public: | 26 public: |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 private: | 169 private: |
| 169 GrTextureDomainEffect(GrTexture*, | 170 GrTextureDomainEffect(GrTexture*, |
| 170 const SkMatrix&, | 171 const SkMatrix&, |
| 171 const SkRect& domain, | 172 const SkRect& domain, |
| 172 GrTextureDomain::Mode, | 173 GrTextureDomain::Mode, |
| 173 GrTextureParams::FilterMode, | 174 GrTextureParams::FilterMode, |
| 174 GrCoordSet); | 175 GrCoordSet); |
| 175 | 176 |
| 176 virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; | 177 virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; |
| 177 | 178 |
| 178 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR
IDE; | 179 virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVE
RRIDE; |
| 179 | 180 |
| 180 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 181 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
| 181 | 182 |
| 182 typedef GrSingleTextureEffect INHERITED; | 183 typedef GrSingleTextureEffect INHERITED; |
| 183 }; | 184 }; |
| 184 | 185 |
| 185 #endif | 186 #endif |
| OLD | NEW |