diff options
author | Brian Salomon <bsalomon@google.com> | 2016-11-21 13:41:08 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-21 19:13:43 +0000 |
commit | 99938a8ef24e2dd5b39f78638742e9b50ab6d9bf (patch) | |
tree | e3842210db20a4574e9cec37ae7f049aaff27b65 /experimental/SkPerlinNoiseShader2 | |
parent | d728f0c1a94fe926b59d8ebc9ae174019ccd3606 (diff) |
Merge GrGLSLShaderVar and GrShaderVar
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5087
Change-Id: Ib8943a1da1ea495554feaf5b0992b94fbb9539ab
Reviewed-on: https://skia-review.googlesource.com/5087
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'experimental/SkPerlinNoiseShader2')
-rw-r--r-- | experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp index da13732ba7..1dcd8de888 100644 --- a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp +++ b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp @@ -774,15 +774,15 @@ void GrGLPerlinNoise2::emitCode(EmitArgs& args) { const char* dotLattice = "dot(((%s.ga + %s.rb * vec2(%s)) * vec2(2.0) - vec2(1.0)), %s);"; // Add noise function - static const GrGLSLShaderVar gPerlinNoiseArgs[] = { - GrGLSLShaderVar(chanCoord, kFloat_GrSLType), - GrGLSLShaderVar(noiseVec, kVec2f_GrSLType) + static const GrShaderVar gPerlinNoiseArgs[] = { + GrShaderVar(chanCoord, kFloat_GrSLType), + GrShaderVar(noiseVec, kVec2f_GrSLType) }; - static const GrGLSLShaderVar gPerlinNoiseStitchArgs[] = { - GrGLSLShaderVar(chanCoord, kFloat_GrSLType), - GrGLSLShaderVar(noiseVec, kVec2f_GrSLType), - GrGLSLShaderVar(stitchData, kVec2f_GrSLType) + static const GrShaderVar gPerlinNoiseStitchArgs[] = { + GrShaderVar(chanCoord, kFloat_GrSLType), + GrShaderVar(noiseVec, kVec2f_GrSLType), + GrShaderVar(stitchData, kVec2f_GrSLType) }; SkString noiseCode; @@ -1157,8 +1157,8 @@ void GrGLImprovedPerlinNoise::emitCode(EmitArgs& args) { const char* zUni = uniformHandler->getUniformCStr(fZUni); // fade function - static const GrGLSLShaderVar fadeArgs[] = { - GrGLSLShaderVar("t", kVec3f_GrSLType) + static const GrShaderVar fadeArgs[] = { + GrShaderVar("t", kVec3f_GrSLType) }; SkString fadeFuncName; fsBuilder->emitFunction(kVec3f_GrSLType, "fade", SK_ARRAY_COUNT(fadeArgs), @@ -1167,8 +1167,8 @@ void GrGLImprovedPerlinNoise::emitCode(EmitArgs& args) { &fadeFuncName); // perm function - static const GrGLSLShaderVar permArgs[] = { - GrGLSLShaderVar("x", kFloat_GrSLType) + static const GrShaderVar permArgs[] = { + GrShaderVar("x", kFloat_GrSLType) }; SkString permFuncName; SkString permCode("return "); @@ -1181,9 +1181,9 @@ void GrGLImprovedPerlinNoise::emitCode(EmitArgs& args) { permCode.c_str(), &permFuncName); // grad function - static const GrGLSLShaderVar gradArgs[] = { - GrGLSLShaderVar("x", kFloat_GrSLType), - GrGLSLShaderVar("p", kVec3f_GrSLType) + static const GrShaderVar gradArgs[] = { + GrShaderVar("x", kFloat_GrSLType), + GrShaderVar("p", kVec3f_GrSLType) }; SkString gradFuncName; SkString gradCode("return dot("); @@ -1194,18 +1194,18 @@ void GrGLImprovedPerlinNoise::emitCode(EmitArgs& args) { gradCode.c_str(), &gradFuncName); // lerp function - static const GrGLSLShaderVar lerpArgs[] = { - GrGLSLShaderVar("a", kFloat_GrSLType), - GrGLSLShaderVar("b", kFloat_GrSLType), - GrGLSLShaderVar("w", kFloat_GrSLType) + static const GrShaderVar lerpArgs[] = { + GrShaderVar("a", kFloat_GrSLType), + GrShaderVar("b", kFloat_GrSLType), + GrShaderVar("w", kFloat_GrSLType) }; SkString lerpFuncName; fsBuilder->emitFunction(kFloat_GrSLType, "lerp", SK_ARRAY_COUNT(lerpArgs), lerpArgs, "return a + w * (b - a);", &lerpFuncName); // noise function - static const GrGLSLShaderVar noiseArgs[] = { - GrGLSLShaderVar("p", kVec3f_GrSLType), + static const GrShaderVar noiseArgs[] = { + GrShaderVar("p", kVec3f_GrSLType), }; SkString noiseFuncName; SkString noiseCode; @@ -1241,9 +1241,9 @@ void GrGLImprovedPerlinNoise::emitCode(EmitArgs& args) { noiseCode.c_str(), &noiseFuncName); // noiseOctaves function - static const GrGLSLShaderVar noiseOctavesArgs[] = { - GrGLSLShaderVar("p", kVec3f_GrSLType), - GrGLSLShaderVar("octaves", kFloat_GrSLType), + static const GrShaderVar noiseOctavesArgs[] = { + GrShaderVar("p", kVec3f_GrSLType), + GrShaderVar("octaves", kFloat_GrSLType), }; SkString noiseOctavesFuncName; SkString noiseOctavesCode; |