aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrTextureDomain.h
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2015-10-29 07:57:01 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-10-29 07:57:02 -0700
commit7dc4bd06fca73a97dcf3ad4a7425597160f1edfc (patch)
treee257695fd2e59d57bb226d754a8c2c374f6360d7 /src/gpu/effects/GrTextureDomain.h
parentcc92b4a7eca78dcec23d14ccd4ecf5889c35caa1 (diff)
Remove GrGLProcessor and create GrGLSLTextureSampler class.
Part ??? of separating glsl and gl BUG=skia: Review URL: https://codereview.chromium.org/1425013003
Diffstat (limited to 'src/gpu/effects/GrTextureDomain.h')
-rw-r--r--src/gpu/effects/GrTextureDomain.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/gpu/effects/GrTextureDomain.h b/src/gpu/effects/GrTextureDomain.h
index 0b93ac859f..bbe988cf1b 100644
--- a/src/gpu/effects/GrTextureDomain.h
+++ b/src/gpu/effects/GrTextureDomain.h
@@ -15,6 +15,7 @@
class GrGLProgramBuilder;
class GrGLShaderBuilder;
class GrInvariantOutput;
+class GrGLSLTextureSampler;
struct SkRect;
/**
@@ -88,10 +89,10 @@ public:
}
/**
- * A GrGLProcessor subclass that corresponds to a GrProcessor subclass that uses GrTextureDomain
- * should include this helper. It generates the texture domain GLSL, produces the part of the
- * effect key that reflects the texture domain code, and performs the uniform uploads necessary
- * for texture domains.
+ * A GrGLFragmentProcessor subclass that corresponds to a GrProcessor subclass that uses
+ * GrTextureDomain should include this helper. It generates the texture domain GLSL, produces
+ * the part of the effect key that reflects the texture domain code, and performs the uniform
+ * uploads necessary for texture domains.
*/
class GLDomain {
public:
@@ -103,8 +104,8 @@ public:
}
/**
- * Call this from GrGLProcessor::emitCode() to sample the texture W.R.T. the domain and
- * mode.
+ * Call this from GrGLFragmentProcessor::emitCode() to sample the texture W.R.T. the domain
+ * and mode.
*
* @param outcolor name of vec4 variable to hold the sampled color.
* @param inCoords name of vec2 variable containing the coords to be used with the domain.
@@ -116,12 +117,13 @@ public:
const GrTextureDomain& textureDomain,
const char* outColor,
const SkString& inCoords,
- const GrGLProcessor::TextureSampler sampler,
+ const GrGLSLTextureSampler& sampler,
const char* inModulateColor = nullptr);
/**
- * Call this from GrGLProcessor::setData() to upload uniforms necessary for the texture
- * domain. The rectangle is automatically adjusted to account for the texture's origin.
+ * Call this from GrGLFragmentProcessor::setData() to upload uniforms necessary for the
+ * texture domain. The rectangle is automatically adjusted to account for the texture's
+ * origin.
*/
void setData(const GrGLSLProgramDataManager& pdman, const GrTextureDomain& textureDomain,
GrSurfaceOrigin textureOrigin);
@@ -131,8 +133,8 @@ public:
};
/**
- * GrGLProcessor::GenKey() must call this and include the returned value in it's computed
- * key. The returned will be limited to the lower kDomainKeyBits bits.
+ * GrGLFragmentProcessor::GenKey() must call this and include the returned value in it's
+ * computed key. The returned will be limited to the lower kDomainKeyBits bits.
*/
static uint32_t DomainKey(const GrTextureDomain& domain) {
GR_STATIC_ASSERT(kModeCount <= 4);