diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-15 20:58:17 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-15 20:58:17 +0000 |
commit | 23595a59a76ae38afbbb53dd11f81fbe46ee82c1 (patch) | |
tree | 26f43996286225d1509e43ff177db193633488b8 /src | |
parent | 3c95d5b55d560c819b7a81b04c942d8f7f0b17a3 (diff) |
Fix busted texture coords in GrGLBlendEffect.
Review URL: https://codereview.appspot.com/7095062
git-svn-id: http://skia.googlecode.com/svn/trunk@7209 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/effects/SkBlendImageFilter.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/effects/SkBlendImageFilter.cpp b/src/effects/SkBlendImageFilter.cpp index 3c625bb0b4..74ec7e31a0 100644 --- a/src/effects/SkBlendImageFilter.cpp +++ b/src/effects/SkBlendImageFilter.cpp @@ -277,20 +277,23 @@ void GrGLBlendEffect::emitCode(GrGLShaderBuilder* builder, const char* outputColor, const char* inputColor, const TextureSamplerArray& samplers) { - const char* coords; - GrSLType fgCoordsType = fForegroundEffectMatrix.emitCode(builder, key, vertexCoords, &coords, NULL, "FG"); - GrSLType bgCoordsType = fBackgroundEffectMatrix.emitCode(builder, key, vertexCoords, &coords, NULL, "BG"); + const char* fgCoords; + const char* bgCoords; + GrSLType fgCoordsType = fForegroundEffectMatrix.emitCode( + builder, key, vertexCoords, &fgCoords, NULL, "FG"); + GrSLType bgCoordsType = fBackgroundEffectMatrix.emitCode( + builder, key, vertexCoords, &bgCoords, NULL, "BG"); SkString* code = &builder->fFSCode; const char* bgColor = "bgColor"; const char* fgColor = "fgColor"; code->appendf("\t\tvec4 %s = ", fgColor); - builder->appendTextureLookup(code, samplers[0], coords, fgCoordsType); + builder->appendTextureLookup(code, samplers[0], fgCoords, fgCoordsType); code->append(";\n"); code->appendf("\t\tvec4 %s = ", bgColor); - builder->appendTextureLookup(code, samplers[1], coords, bgCoordsType); + builder->appendTextureLookup(code, samplers[1], bgCoords, bgCoordsType); code->append(";\n"); code->appendf("\t\t%s.a = 1.0 - (1.0 - %s.a) * (1.0 - %s.b);\n", outputColor, bgColor, fgColor); |