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

Unified Diff: src/gpu/effects/GrTextureDomainEffect.cpp

Issue 23826002: Rename ShaderType enum to ShaderVisibility (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.cpp ('k') | src/gpu/gl/GrGLEffectMatrix.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrTextureDomainEffect.cpp
diff --git a/src/gpu/effects/GrTextureDomainEffect.cpp b/src/gpu/effects/GrTextureDomainEffect.cpp
index 6f400cf3c1c5c30f68f8fb75c18914cefe8672df..c7eda889aa50aa3e08d4d62b5a9881bcb5b0c75d 100644
--- a/src/gpu/effects/GrTextureDomainEffect.cpp
+++ b/src/gpu/effects/GrTextureDomainEffect.cpp
@@ -53,7 +53,7 @@ void GrGLTextureDomainEffect::emitCode(GrGLShaderBuilder* builder,
SkString coords;
fEffectMatrix.emitCodeMakeFSCoords2D(builder, key, &coords);
const char* domain;
- fNameUni = builder->addUniform(GrGLShaderBuilder::kFragment_ShaderType,
+ fNameUni = builder->addUniform(GrGLShaderBuilder::kFragment_Visibility,
kVec4f_GrSLType, "TexDom", &domain);
if (GrTextureDomainEffect::kClamp_WrapMode == texDom.wrapMode()) {
@@ -61,10 +61,7 @@ void GrGLTextureDomainEffect::emitCode(GrGLShaderBuilder* builder,
coords.c_str(), domain, domain);
builder->fsCodeAppendf("\t%s = ", outputColor);
- builder->appendTextureLookupAndModulate(GrGLShaderBuilder::kFragment_ShaderType,
- inputColor,
- samplers[0],
- "clampCoord");
+ builder->fsAppendTextureLookupAndModulate(inputColor, samplers[0], "clampCoord");
builder->fsCodeAppend(";\n");
} else {
SkASSERT(GrTextureDomainEffect::kDecal_WrapMode == texDom.wrapMode());
@@ -78,10 +75,7 @@ void GrGLTextureDomainEffect::emitCode(GrGLShaderBuilder* builder,
// result=white;" code fails to compile.
builder->fsCodeAppend("\tvec4 outside = vec4(0.0, 0.0, 0.0, 0.0);\n");
builder->fsCodeAppend("\tvec4 inside = ");
- builder->appendTextureLookupAndModulate(GrGLShaderBuilder::kFragment_ShaderType,
- inputColor,
- samplers[0],
- coords.c_str());
+ builder->fsAppendTextureLookupAndModulate(inputColor, samplers[0], coords.c_str());
builder->fsCodeAppend(";\n");
builder->fsCodeAppendf("\tfloat x = abs(2.0*(%s.x - %s.x)/(%s.z - %s.x) - 1.0);\n",
@@ -95,10 +89,7 @@ void GrGLTextureDomainEffect::emitCode(GrGLShaderBuilder* builder,
builder->fsCodeAppendf("\toutside.xy = lessThan(%s, %s.xy);\n", coords.c_str(), domain);
builder->fsCodeAppendf("\toutside.zw = greaterThan(%s, %s.zw);\n", coords.c_str(), domain);
builder->fsCodeAppendf("\t%s = any(outside) ? vec4(0.0, 0.0, 0.0, 0.0) : ", outputColor);
- builder->appendTextureLookupAndModulate(GrGLShaderBuilder::kFragment_ShaderType,
- inputColor,
- samplers[0],
- coords.c_str());
+ builder->fsAppendTextureLookupAndModulate(inputColor, samplers[0], coords.c_str());
builder->fsCodeAppend(";\n");
}
}
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.cpp ('k') | src/gpu/gl/GrGLEffectMatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698