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

Unified Diff: src/effects/SkDisplacementMapEffect.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/effects/SkColorMatrixFilter.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkDisplacementMapEffect.cpp
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index 4dfb754190d78f12289682dcbafd282d89b849ec..a0764ed223cd42a66a53b9dec06d658e64c239c0 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -409,7 +409,7 @@ void GrGLDisplacementMapEffect::emitCode(GrGLShaderBuilder* builder,
const TextureSamplerArray& samplers) {
sk_ignore_unused_variable(inputColor);
- fScaleUni = builder->addUniform(GrGLShaderBuilder::kFragment_ShaderType,
+ fScaleUni = builder->addUniform(GrGLShaderBuilder::kFragment_Visibility,
kVec2f_GrSLType, "Scale");
const char* scaleUni = builder->getUniformCStr(fScaleUni);
@@ -428,10 +428,7 @@ void GrGLDisplacementMapEffect::emitCode(GrGLShaderBuilder* builder,
// leave room for 32-bit float GPU rounding errors.
builder->fsCodeAppendf("\t\tvec4 %s = ", dColor);
- builder->appendTextureLookup(GrGLShaderBuilder::kFragment_ShaderType,
- samplers[0],
- dCoordsIn.c_str(),
- dCoordsType);
+ builder->fsAppendTextureLookup(samplers[0], dCoordsIn.c_str(), dCoordsType);
builder->fsCodeAppend(";\n");
// Unpremultiply the displacement
@@ -484,10 +481,7 @@ void GrGLDisplacementMapEffect::emitCode(GrGLShaderBuilder* builder,
"bool %s = (%s.x < 0.0) || (%s.y < 0.0) || (%s.x > 1.0) || (%s.y > 1.0);\t\t",
outOfBounds, cCoords, cCoords, cCoords, cCoords);
builder->fsCodeAppendf("%s = %s ? vec4(0.0) : ", outputColor, outOfBounds);
- builder->appendTextureLookup(GrGLShaderBuilder::kFragment_ShaderType,
- samplers[1],
- cCoords,
- cCoordsType);
+ builder->fsAppendTextureLookup(samplers[1], cCoords, cCoordsType);
builder->fsCodeAppend(";\n");
}
« no previous file with comments | « src/effects/SkColorMatrixFilter.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698