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 #include "GrTextureDomain.h" | 8 #include "GrTextureDomain.h" |
9 #include "GrInvariantOutput.h" | 9 #include "GrInvariantOutput.h" |
10 #include "GrSimpleTextureEffect.h" | 10 #include "GrSimpleTextureEffect.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 class GrGLTextureDomainEffect : public GrGLFragmentProcessor { | 168 class GrGLTextureDomainEffect : public GrGLFragmentProcessor { |
169 public: | 169 public: |
170 GrGLTextureDomainEffect(const GrProcessor&); | 170 GrGLTextureDomainEffect(const GrProcessor&); |
171 | 171 |
172 virtual void emitCode(GrGLFPBuilder*, | 172 virtual void emitCode(GrGLFPBuilder*, |
173 const GrFragmentProcessor&, | 173 const GrFragmentProcessor&, |
174 const char* outputColor, | 174 const char* outputColor, |
175 const char* inputColor, | 175 const char* inputColor, |
176 const TransformedCoordsArray&, | 176 const TransformedCoordsArray&, |
177 const TextureSamplerArray&) SK_OVERRIDE; | 177 const TextureSamplerArray&) override; |
178 | 178 |
179 void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; | 179 void setData(const GrGLProgramDataManager&, const GrProcessor&) override; |
180 | 180 |
181 static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKe
yBuilder*); | 181 static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKe
yBuilder*); |
182 | 182 |
183 private: | 183 private: |
184 GrTextureDomain::GLDomain fGLDomain; | 184 GrTextureDomain::GLDomain fGLDomain; |
185 typedef GrGLFragmentProcessor INHERITED; | 185 typedef GrGLFragmentProcessor INHERITED; |
186 }; | 186 }; |
187 | 187 |
188 GrGLTextureDomainEffect::GrGLTextureDomainEffect(const GrProcessor&) { | 188 GrGLTextureDomainEffect::GrGLTextureDomainEffect(const GrProcessor&) { |
189 } | 189 } |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 const SkMatrix& matrix = GrProcessorUnitTest::TestMatrix(random); | 302 const SkMatrix& matrix = GrProcessorUnitTest::TestMatrix(random); |
303 bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? random->nextBool() : f
alse; | 303 bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? random->nextBool() : f
alse; |
304 GrCoordSet coords = random->nextBool() ? kLocal_GrCoordSet : kDevice_GrCoord
Set; | 304 GrCoordSet coords = random->nextBool() ? kLocal_GrCoordSet : kDevice_GrCoord
Set; |
305 return GrTextureDomainEffect::Create(textures[texIdx], | 305 return GrTextureDomainEffect::Create(textures[texIdx], |
306 matrix, | 306 matrix, |
307 domain, | 307 domain, |
308 mode, | 308 mode, |
309 bilerp ? GrTextureParams::kBilerp_Filte
rMode : GrTextureParams::kNone_FilterMode, | 309 bilerp ? GrTextureParams::kBilerp_Filte
rMode : GrTextureParams::kNone_FilterMode, |
310 coords); | 310 coords); |
311 } | 311 } |
OLD | NEW |