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

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

Issue 1862373003: Rename EmitArgs::fSamplers to fTexSamplers (Closed) Base URL: https://skia.googlesource.com/skia.git@upload3_infer
Patch Set: rebase 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/GrSimpleTextureEffect.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
11 #include "GrSingleTextureEffect.h" 11 #include "GrSingleTextureEffect.h"
12 #include "glsl/GrGLSLFragmentProcessor.h" 12 #include "glsl/GrGLSLFragmentProcessor.h"
13 #include "glsl/GrGLSLProgramDataManager.h" 13 #include "glsl/GrGLSLProgramDataManager.h"
14 14
15 class GrGLProgramBuilder; 15 class GrGLProgramBuilder;
16 class GrGLSLShaderBuilder; 16 class GrGLSLShaderBuilder;
17 class GrInvariantOutput; 17 class GrInvariantOutput;
18 class GrGLSLTextureSampler; 18 class GrGLSLSampler;
19 class GrGLSLUniformHandler; 19 class GrGLSLUniformHandler;
20 struct SkRect; 20 struct SkRect;
21 21
22 /** 22 /**
23 * Limits a texture's lookup coordinates to a domain. Samples outside the domain are either clamped 23 * Limits a texture's lookup coordinates to a domain. Samples outside the domain are either clamped
24 * the edge of the domain or result in a vec4 of zeros (decal mode). The domain is clipped to 24 * the edge of the domain or result in a vec4 of zeros (decal mode). The domain is clipped to
25 * normalized texture coords ([0,1]x[0,1] square). Bilinear filtering can cause texels outside the 25 * normalized texture coords ([0,1]x[0,1] square). Bilinear filtering can cause texels outside the
26 * domain to affect the read value unless the caller considers this when calcula ting the domain. 26 * domain to affect the read value unless the caller considers this when calcula ting the domain.
27 */ 27 */
28 class GrTextureDomain { 28 class GrTextureDomain {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 * It is assumed that this is a variable and not an exp ression. 113 * It is assumed that this is a variable and not an exp ression.
114 * @param inModulateColor if non-nullptr the sampled color will be mod ulated with this 114 * @param inModulateColor if non-nullptr the sampled color will be mod ulated with this
115 * expression before being written to outColor. 115 * expression before being written to outColor.
116 */ 116 */
117 void sampleTexture(GrGLSLShaderBuilder* builder, 117 void sampleTexture(GrGLSLShaderBuilder* builder,
118 GrGLSLUniformHandler* uniformHandler, 118 GrGLSLUniformHandler* uniformHandler,
119 const GrGLSLCaps* glslCaps, 119 const GrGLSLCaps* glslCaps,
120 const GrTextureDomain& textureDomain, 120 const GrTextureDomain& textureDomain,
121 const char* outColor, 121 const char* outColor,
122 const SkString& inCoords, 122 const SkString& inCoords,
123 const GrGLSLTextureSampler& sampler, 123 const GrGLSLSampler& sampler,
124 const char* inModulateColor = nullptr); 124 const char* inModulateColor = nullptr);
125 125
126 /** 126 /**
127 * Call this from GrGLSLFragmentProcessor::setData() to upload uniforms necessary for the 127 * Call this from GrGLSLFragmentProcessor::setData() to upload uniforms necessary for the
128 * texture domain. The rectangle is automatically adjusted to account fo r the texture's 128 * texture domain. The rectangle is automatically adjusted to account fo r the texture's
129 * origin. 129 * origin.
130 */ 130 */
131 void setData(const GrGLSLProgramDataManager& pdman, const GrTextureDomai n& textureDomain, 131 void setData(const GrGLSLProgramDataManager& pdman, const GrTextureDomai n& textureDomain,
132 GrSurfaceOrigin textureOrigin); 132 GrSurfaceOrigin textureOrigin);
133 133
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 bool onIsEqual(const GrFragmentProcessor&) const override; 206 bool onIsEqual(const GrFragmentProcessor&) const override;
207 207
208 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; 208 void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
209 209
210 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 210 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
211 211
212 typedef GrSingleTextureEffect INHERITED; 212 typedef GrSingleTextureEffect INHERITED;
213 }; 213 };
214 214
215 #endif 215 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.cpp ('k') | src/gpu/effects/GrTextureDomain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698