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.h

Issue 1453623003: Move glsl onto EmitArgs struct for emitCode (Closed) Base URL: https://skia.googlesource.com/skia.git@moveShaders
Patch Set: nit Created 5 years, 1 month 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/GrMatrixConvolutionEffect.cpp ('k') | src/gpu/effects/GrTextureDomain.cpp » ('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 #ifndef GrTextureDomainEffect_DEFINED 8 #ifndef GrTextureDomainEffect_DEFINED
9 #define GrTextureDomainEffect_DEFINED 9 #define GrTextureDomainEffect_DEFINED
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 * Call this from GrGLSLFragmentProcessor::emitCode() to sample the text ure W.R.T. the 107 * Call this from GrGLSLFragmentProcessor::emitCode() to sample the text ure W.R.T. the
108 * domain and mode. 108 * domain and mode.
109 * 109 *
110 * @param outcolor name of vec4 variable to hold the sampled color. 110 * @param outcolor name of vec4 variable to hold the sampled color.
111 * @param inCoords name of vec2 variable containing the coords to be us ed with the domain. 111 * @param inCoords name of vec2 variable containing the coords to be us ed with the domain.
112 * It is assumed that this is a variable and not an exp ression. 112 * It is assumed that this is a variable and not an exp ression.
113 * @param inModulateColor if non-nullptr the sampled color will be mod ulated with this 113 * @param inModulateColor if non-nullptr the sampled color will be mod ulated with this
114 * expression before being written to outColor. 114 * expression before being written to outColor.
115 */ 115 */
116 void sampleTexture(GrGLSLShaderBuilder* builder, 116 void sampleTexture(GrGLSLShaderBuilder* builder,
117 const GrGLSLCaps* glslCaps,
117 const GrTextureDomain& textureDomain, 118 const GrTextureDomain& textureDomain,
118 const char* outColor, 119 const char* outColor,
119 const SkString& inCoords, 120 const SkString& inCoords,
120 const GrGLSLTextureSampler& sampler, 121 const GrGLSLTextureSampler& sampler,
121 const char* inModulateColor = nullptr); 122 const char* inModulateColor = nullptr);
122 123
123 /** 124 /**
124 * Call this from GrGLSLFragmentProcessor::setData() to upload uniforms necessary for the 125 * Call this from GrGLSLFragmentProcessor::setData() to upload uniforms necessary for the
125 * texture domain. The rectangle is automatically adjusted to account fo r the texture's 126 * texture domain. The rectangle is automatically adjusted to account fo r the texture's
126 * origin. 127 * origin.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 bool onIsEqual(const GrFragmentProcessor&) const override; 204 bool onIsEqual(const GrFragmentProcessor&) const override;
204 205
205 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; 206 void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
206 207
207 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 208 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
208 209
209 typedef GrSingleTextureEffect INHERITED; 210 typedef GrSingleTextureEffect INHERITED;
210 }; 211 };
211 212
212 #endif 213 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrMatrixConvolutionEffect.cpp ('k') | src/gpu/effects/GrTextureDomain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698