Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(576)

Unified Diff: src/effects/SkArithmeticMode.cpp

Issue 25048002: Express (GLSL expression, possibly known value) pairs as a class (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/effects/SkArithmeticMode.cpp
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp
index fd3a683fbb92bc009c12daa290366da6724bf210..83b24cc80e8b9699ba305b3a09dcd9cc86919fa0 100644
--- a/src/effects/SkArithmeticMode.cpp
+++ b/src/effects/SkArithmeticMode.cpp
@@ -368,7 +368,7 @@ void GrGLArithmeticEffect::emitCode(GrGLShaderBuilder* builder,
// We don't try to optimize for this case at all
if (NULL == inputColor) {
- builder->fsCodeAppendf("\t\tconst vec4 src = %s;\n", GrGLSLOnesVecf(4));
+ builder->fsCodeAppendf("\t\tconst vec4 src = %s;\n", GrGLSLExpr<4>(1).c_str());
bsalomon 2013/10/02 15:18:04 Hmm.. This feels a little bit less readable. I'd
Kimmo Kinnunen 2013/10/08 12:18:29 I fixed this and the other similar instance by jus
bsalomon 2013/10/08 14:45:27 Yes, that seems like the most readable to me.
} else {
builder->fsCodeAppendf("\t\tvec4 src = %s;\n", inputColor);
if (gUseUnpremul) {

Powered by Google App Engine
This is Rietveld 408576698