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

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

Issue 1896013003: Revert of Refactor how we store and use samplers in Ganesh (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « src/gpu/effects/GrTextureDomain.h ('k') | src/gpu/gl/GrGLProgram.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 ////////////////////////////////////////////////////////////////////////////// 44 //////////////////////////////////////////////////////////////////////////////
45 45
46 void GrTextureDomain::GLDomain::sampleTexture(GrGLSLShaderBuilder* builder, 46 void GrTextureDomain::GLDomain::sampleTexture(GrGLSLShaderBuilder* builder,
47 GrGLSLUniformHandler* uniformHandl er, 47 GrGLSLUniformHandler* uniformHandl er,
48 const GrGLSLCaps* glslCaps, 48 const GrGLSLCaps* glslCaps,
49 const GrTextureDomain& textureDoma in, 49 const GrTextureDomain& textureDoma in,
50 const char* outColor, 50 const char* outColor,
51 const SkString& inCoords, 51 const SkString& inCoords,
52 GrGLSLFragmentProcessor::SamplerHa ndle sampler, 52 const GrGLSLSampler& sampler,
53 const char* inModulateColor) { 53 const char* inModulateColor) {
54 SkASSERT((Mode)-1 == fMode || textureDomain.mode() == fMode); 54 SkASSERT((Mode)-1 == fMode || textureDomain.mode() == fMode);
55 SkDEBUGCODE(fMode = textureDomain.mode();) 55 SkDEBUGCODE(fMode = textureDomain.mode();)
56 56
57 if (textureDomain.mode() != kIgnore_Mode && !fDomainUni.isValid()) { 57 if (textureDomain.mode() != kIgnore_Mode && !fDomainUni.isValid()) {
58 const char* name; 58 const char* name;
59 SkString uniName("TexDom"); 59 SkString uniName("TexDom");
60 if (textureDomain.fIndex >= 0) { 60 if (textureDomain.fIndex >= 0) {
61 uniName.appendS32(textureDomain.fIndex); 61 uniName.appendS32(textureDomain.fIndex);
62 } 62 }
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? d->fRandom->nextBool() : false; 292 bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? d->fRandom->nextBool() : false;
293 GrCoordSet coords = d->fRandom->nextBool() ? kLocal_GrCoordSet : kDevice_GrC oordSet; 293 GrCoordSet coords = d->fRandom->nextBool() ? kLocal_GrCoordSet : kDevice_GrC oordSet;
294 return GrTextureDomainEffect::Create( 294 return GrTextureDomainEffect::Create(
295 d->fTextures[texIdx], 295 d->fTextures[texIdx],
296 matrix, 296 matrix,
297 domain, 297 domain,
298 mode, 298 mode,
299 bilerp ? GrTextureParams::kBilerp_FilterMode : GrTextureParams::kNone_Fi lterMode, 299 bilerp ? GrTextureParams::kBilerp_FilterMode : GrTextureParams::kNone_Fi lterMode,
300 coords); 300 coords);
301 } 301 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrTextureDomain.h ('k') | src/gpu/gl/GrGLProgram.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698