From: commit-bot@chromium.org Date: Mon, 29 Apr 2013 15:25:03 +0000 (+0000) Subject: Remove redundant setting of alpha in hard-light GPU shader. X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~12569 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd72fdec762f2889bc09bc3f854bef3c1a2678f9;p=platform%2Fupstream%2FlibSkiaSharp.git Remove redundant setting of alpha in hard-light GPU shader. R=jvanverth@google.com Author: bsalomon@google.com Review URL: https://chromiumcodereview.appspot.com/14418005 git-svn-id: http://skia.googlecode.com/svn/trunk@8903 2bbb7eff-a529-9590-31e7-b0007b416f81 --- diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp index ac8546c..082f407 100644 --- a/src/core/SkXfermode.cpp +++ b/src/core/SkXfermode.cpp @@ -996,7 +996,7 @@ public: // We don't try to optimize for this case at all if (NULL == inputColor) { - builder->fsCodeAppendf("\tconst vec4 ones = %s;\n", GrGLSLOnesVecf(4)); + builder->fsCodeAppendf("\t\tconst vec4 ones = %s;\n", GrGLSLOnesVecf(4)); inputColor = "ones"; } @@ -1135,8 +1135,6 @@ public: const char* final, const char* src, const char* dst) { - builder->fsCodeAppendf("\t\t%s.a = 1.0 - (1.0 - %s.a) * (1.0 - %s.a);\n", - final, dst, src); builder->fsCodeAppendf("\t\t%s.rgb = mix(2.0 * %s.rgb * %s.rgb, ", final, src, dst); builder->fsCodeAppendf("%s.aaa * %s.aaa - 2.0 * (%s.aaa - %s.rgb) * (%s.aaa - %s.rgb),",