diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-04-25 00:40:41 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-04-25 00:40:41 +0000 |
commit | 18c41acf35eefc75ef4631fbb680ec64861b30af (patch) | |
tree | 913ad19c994f8f7e71cc61c9f8c08a8c76e36ba6 | |
parent | 7989b5890feb2d0e3bb59901d8ac79e3777d9b31 (diff) |
Some fixes for saturation computation XferEffect.
R=jvanverth@google.com, robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://chromiumcodereview.appspot.com/14034018
git-svn-id: http://skia.googlecode.com/svn/trunk@8850 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | src/core/SkXfermode.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp index 5c752049f9..56feb8940f 100644 --- a/src/core/SkXfermode.cpp +++ b/src/core/SkXfermode.cpp @@ -1305,7 +1305,7 @@ public: "\t\tmidComp = sat * (midComp - minComp) / (maxComp - minComp);\n" "\t\tmaxComp = sat;\n" "\t} else {\n" - "\t\tmidComp = midComp = 0.0;\n" + "\t\tmidComp = maxComp = 0.0;\n" "\t}\n" "\tminComp = 0.0;\n"); builder->emitFunction(GrGLShaderBuilder::kFragment_ShaderType, @@ -1325,8 +1325,10 @@ public: "\tif (hueLumColor.r <= hueLumColor.g) {\n" "\t\tif (hueLumColor.g <= hueLumColor.b) {\n" "\t\t\t%s(hueLumColor.r, hueLumColor.g, hueLumColor.b, sat);\n" - "\t\t} else {\n" + "\t\t} else if (hueLumColor.r <= hueLumColor.b) {\n" "\t\t\t%s(hueLumColor.r, hueLumColor.b, hueLumColor.g, sat);\n" + "\t\t} else {\n" + "\t\t\t%s(hueLumColor.b, hueLumColor.r, hueLumColor.g, sat);\n" "\t\t}\n" "\t} else if (hueLumColor.r <= hueLumColor.b) {\n" "\t\t%s(hueLumColor.g, hueLumColor.r, hueLumColor.b, sat);\n" @@ -1336,8 +1338,8 @@ public: "\t\t%s(hueLumColor.b, hueLumColor.g, hueLumColor.r, sat);\n" "\t}\n" "\treturn hueLumColor;", - getFunction.c_str(), helpFunc, helpFunc, helpFunc, helpFunc,\ - helpFunc); + getFunction.c_str(), helpFunc, helpFunc, helpFunc, helpFunc, + helpFunc, helpFunc); builder->emitFunction(GrGLShaderBuilder::kFragment_ShaderType, kVec3f_GrSLType, "set_saturation", |