| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 SkRect result = { | 61 SkRect result = { |
| 62 texelRect.fLeft * wInv, | 62 texelRect.fLeft * wInv, |
| 63 texelRect.fTop * hInv, | 63 texelRect.fTop * hInv, |
| 64 texelRect.fRight * wInv, | 64 texelRect.fRight * wInv, |
| 65 texelRect.fBottom * hInv | 65 texelRect.fBottom * hInv |
| 66 }; | 66 }; |
| 67 return result; | 67 return result; |
| 68 } | 68 } |
| 69 | 69 |
| 70 bool operator== (const GrTextureDomain& that) const { | 70 bool operator== (const GrTextureDomain& that) const { |
| 71 return fMode == that.fMode && fDomain == that.fDomain; | 71 return fMode == that.fMode && (kIgnore_Mode == fMode || fDomain == that.
fDomain); |
| 72 } | 72 } |
| 73 | 73 |
| 74 /** | 74 /** |
| 75 * A GrGLEffect subclass that corresponds to a GrEffect subclass that uses G
rTextureDomain | 75 * A GrGLEffect subclass that corresponds to a GrEffect subclass that uses G
rTextureDomain |
| 76 * should include this helper. It generates the texture domain GLSL, produce
s the part of the | 76 * should include this helper. It generates the texture domain GLSL, produce
s the part of the |
| 77 * effect key that reflects the texture domain code, and performs the unifor
m uploads necessary | 77 * effect key that reflects the texture domain code, and performs the unifor
m uploads necessary |
| 78 * for texture domains. | 78 * for texture domains. |
| 79 */ | 79 */ |
| 80 class GLDomain { | 80 class GLDomain { |
| 81 public: | 81 public: |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 GrCoordSet); | 173 GrCoordSet); |
| 174 | 174 |
| 175 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE; | 175 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE; |
| 176 | 176 |
| 177 GR_DECLARE_EFFECT_TEST; | 177 GR_DECLARE_EFFECT_TEST; |
| 178 | 178 |
| 179 typedef GrSingleTextureEffect INHERITED; | 179 typedef GrSingleTextureEffect INHERITED; |
| 180 }; | 180 }; |
| 181 | 181 |
| 182 #endif | 182 #endif |
| OLD | NEW |