| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 private: | 184 private: |
| 185 GrTextureDomain::GLDomain fGLDomain; | 185 GrTextureDomain::GLDomain fGLDomain; |
| 186 typedef GrGLSLFragmentProcessor INHERITED; | 186 typedef GrGLSLFragmentProcessor INHERITED; |
| 187 }; | 187 }; |
| 188 | 188 |
| 189 void GrGLTextureDomainEffect::emitCode(EmitArgs& args) { | 189 void GrGLTextureDomainEffect::emitCode(EmitArgs& args) { |
| 190 const GrTextureDomainEffect& textureDomainEffect = args.fFp.cast<GrTextureDo
mainEffect>(); | 190 const GrTextureDomainEffect& textureDomainEffect = args.fFp.cast<GrTextureDo
mainEffect>(); |
| 191 const GrTextureDomain& domain = textureDomainEffect.textureDomain(); | 191 const GrTextureDomain& domain = textureDomainEffect.textureDomain(); |
| 192 | 192 |
| 193 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; | 193 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; |
| 194 SkString coords2D = fragBuilder->ensureFSCoords2D(args.fCoords, 0); | 194 SkString coords2D = fragBuilder->ensureCoords2D(args.fTransformedCoords[0]); |
| 195 fGLDomain.sampleTexture(fragBuilder, | 195 fGLDomain.sampleTexture(fragBuilder, |
| 196 args.fUniformHandler, | 196 args.fUniformHandler, |
| 197 args.fGLSLCaps, | 197 args.fGLSLCaps, |
| 198 domain, | 198 domain, |
| 199 args.fOutputColor, | 199 args.fOutputColor, |
| 200 coords2D, | 200 coords2D, |
| 201 args.fTexSamplers[0], | 201 args.fTexSamplers[0], |
| 202 args.fInputColor); | 202 args.fInputColor); |
| 203 } | 203 } |
| 204 | 204 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 GrCoordSet coords = d->fRandom->nextBool() ? kLocal_GrCoordSet : kDevice_GrC
oordSet; | 297 GrCoordSet coords = d->fRandom->nextBool() ? kLocal_GrCoordSet : kDevice_GrC
oordSet; |
| 298 return GrTextureDomainEffect::Make( | 298 return GrTextureDomainEffect::Make( |
| 299 d->fTextures[texIdx], | 299 d->fTextures[texIdx], |
| 300 nullptr, | 300 nullptr, |
| 301 matrix, | 301 matrix, |
| 302 domain, | 302 domain, |
| 303 mode, | 303 mode, |
| 304 bilerp ? GrTextureParams::kBilerp_FilterMode : GrTextureParams::kNone_Fi
lterMode, | 304 bilerp ? GrTextureParams::kBilerp_FilterMode : GrTextureParams::kNone_Fi
lterMode, |
| 305 coords); | 305 coords); |
| 306 } | 306 } |
| OLD | NEW |