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

Side by Side Diff: src/gpu/gl/GrGLSL.cpp

Issue 78843006: Minor fix in Ganesh shader generation. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrGLSL.h" 8 #include "GrGLSL.h"
9 #include "GrGLShaderVar.h" 9 #include "GrGLShaderVar.h"
10 #include "SkString.h" 10 #include "SkString.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 const char* vec4VarName, 79 const char* vec4VarName,
80 const GrGLSLExpr4& mulFactor) { 80 const GrGLSLExpr4& mulFactor) {
81 if (mulFactor.isOnes()) { 81 if (mulFactor.isOnes()) {
82 *outAppend = SkString(); 82 *outAppend = SkString();
83 } 83 }
84 84
85 append_tabs(outAppend, tabCnt); 85 append_tabs(outAppend, tabCnt);
86 86
87 if (mulFactor.isZeros()) { 87 if (mulFactor.isZeros()) {
88 outAppend->appendf("%s = vec4(0);\n", vec4VarName); 88 outAppend->appendf("%s = vec4(0);\n", vec4VarName);
89 } else {
90 outAppend->appendf("%s *= %s;\n", vec4VarName, mulFactor.c_str());
89 } 91 }
90 outAppend->appendf("%s *= %s;\n", vec4VarName, mulFactor.c_str());
91 } 92 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698