Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/gpu/effects/GrTextureDomain.cpp

Issue 1709153002: Add more specialized fragment builders (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make MSVC happy Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 private: 186 private:
187 GrTextureDomain::GLDomain fGLDomain; 187 GrTextureDomain::GLDomain fGLDomain;
188 typedef GrGLSLFragmentProcessor INHERITED; 188 typedef GrGLSLFragmentProcessor INHERITED;
189 }; 189 };
190 190
191 void GrGLTextureDomainEffect::emitCode(EmitArgs& args) { 191 void GrGLTextureDomainEffect::emitCode(EmitArgs& args) {
192 const GrTextureDomainEffect& textureDomainEffect = args.fFp.cast<GrTextureDo mainEffect>(); 192 const GrTextureDomainEffect& textureDomainEffect = args.fFp.cast<GrTextureDo mainEffect>();
193 const GrTextureDomain& domain = textureDomainEffect.textureDomain(); 193 const GrTextureDomain& domain = textureDomainEffect.textureDomain();
194 194
195 GrGLSLFragmentBuilder* fragBuilder = args.fFragBuilder; 195 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
196 SkString coords2D = fragBuilder->ensureFSCoords2D(args.fCoords, 0); 196 SkString coords2D = fragBuilder->ensureFSCoords2D(args.fCoords, 0);
197 fGLDomain.sampleTexture(fragBuilder, 197 fGLDomain.sampleTexture(fragBuilder,
198 args.fUniformHandler, 198 args.fUniformHandler,
199 args.fGLSLCaps, 199 args.fGLSLCaps,
200 domain, 200 domain,
201 args.fOutputColor, 201 args.fOutputColor,
202 coords2D, 202 coords2D,
203 args.fSamplers[0], 203 args.fSamplers[0],
204 args.fInputColor); 204 args.fInputColor);
205 } 205 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? d->fRandom->nextBool() : false; 294 bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? d->fRandom->nextBool() : false;
295 GrCoordSet coords = d->fRandom->nextBool() ? kLocal_GrCoordSet : kDevice_GrC oordSet; 295 GrCoordSet coords = d->fRandom->nextBool() ? kLocal_GrCoordSet : kDevice_GrC oordSet;
296 return GrTextureDomainEffect::Create( 296 return GrTextureDomainEffect::Create(
297 d->fTextures[texIdx], 297 d->fTextures[texIdx],
298 matrix, 298 matrix,
299 domain, 299 domain,
300 mode, 300 mode,
301 bilerp ? GrTextureParams::kBilerp_FilterMode : GrTextureParams::kNone_Fi lterMode, 301 bilerp ? GrTextureParams::kBilerp_FilterMode : GrTextureParams::kNone_Fi lterMode,
302 coords); 302 coords);
303 } 303 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.cpp ('k') | src/gpu/effects/GrXfermodeFragmentProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698