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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 GrSurfaceOrigin textureOrigin); | 101 GrSurfaceOrigin textureOrigin); |
102 | 102 |
103 enum { | 103 enum { |
104 kDomainKeyBits = 2, // See DomainKey(). | 104 kDomainKeyBits = 2, // See DomainKey(). |
105 }; | 105 }; |
106 | 106 |
107 /** | 107 /** |
108 * GrGLEffect::GenKey() must call this and include the returned value in
it's computed key. | 108 * GrGLEffect::GenKey() must call this and include the returned value in
it's computed key. |
109 * The returned will be limited to the lower kDomainKeyBits bits. | 109 * The returned will be limited to the lower kDomainKeyBits bits. |
110 */ | 110 */ |
111 static GrGLEffect::EffectKey DomainKey(const GrTextureDomain& domain) { | 111 static uint32_t DomainKey(const GrTextureDomain& domain) { |
112 GR_STATIC_ASSERT(kModeCount <= 4); | 112 GR_STATIC_ASSERT(kModeCount <= 4); |
113 return domain.mode(); | 113 return domain.mode(); |
114 } | 114 } |
115 | 115 |
116 private: | 116 private: |
117 SkDEBUGCODE(Mode fMode;) | 117 SkDEBUGCODE(Mode fMode;) |
118 GrGLUniformManager::UniformHandle fDomainUni; | 118 GrGLUniformManager::UniformHandle fDomainUni; |
119 SkString fDomainName; | 119 SkString fDomainName; |
120 GrGLfloat fPrevDomain[4]; | 120 GrGLfloat fPrevDomain[4]; |
121 }; | 121 }; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 GrCoordSet); | 166 GrCoordSet); |
167 | 167 |
168 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE; | 168 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE; |
169 | 169 |
170 GR_DECLARE_EFFECT_TEST; | 170 GR_DECLARE_EFFECT_TEST; |
171 | 171 |
172 typedef GrSingleTextureEffect INHERITED; | 172 typedef GrSingleTextureEffect INHERITED; |
173 }; | 173 }; |
174 | 174 |
175 #endif | 175 #endif |
OLD | NEW |