diff options
author | 2017-04-19 15:54:07 -0400 | |
---|---|---|
committer | 2017-04-20 14:00:57 +0000 | |
commit | 5338f99a8a75d0e7622a37c5d1c05fcce49f55f5 (patch) | |
tree | ab2ed862fc23748500da8fc09c4a9d2cca21dcc9 /src/gpu/glsl | |
parent | 7b2391bc06a4cb5db83e3cd13402869fbe8b0bfd (diff) |
rectangle texture scaling is now handled in skslc
Bug: skia:
Change-Id: I658a95576143d69656cd63aec44ff65d430d332f
Reviewed-on: https://skia-review.googlesource.com/13813
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/gpu/glsl')
-rw-r--r-- | src/gpu/glsl/GrGLSLShaderBuilder.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.cpp b/src/gpu/glsl/GrGLSLShaderBuilder.cpp index 865876611a..2c7e5e476d 100644 --- a/src/gpu/glsl/GrGLSLShaderBuilder.cpp +++ b/src/gpu/glsl/GrGLSLShaderBuilder.cpp @@ -72,18 +72,7 @@ void GrGLSLShaderBuilder::appendTextureLookup(SkString* out, const char* coordName, GrSLType varyingType) const { const GrShaderVar& sampler = fProgramBuilder->samplerVariable(samplerHandle); - GrSLType samplerType = sampler.getType(); - if (samplerType == kTexture2DRectSampler_GrSLType) { - if (varyingType == kVec2f_GrSLType) { - out->appendf("texture(%s, textureSize(%s) * %s)", - sampler.c_str(), sampler.c_str(), coordName); - } else { - out->appendf("texture(%s, vec3(textureSize(%s) * %s.xy, %s.z))", - sampler.c_str(), sampler.c_str(), coordName, coordName); - } - } else { - out->appendf("texture(%s, %s)", sampler.c_str(), coordName); - } + out->appendf("texture(%s, %s)", sampler.c_str(), coordName); append_texture_swizzle(out, fProgramBuilder->samplerSwizzle(samplerHandle)); } |