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

Unified Diff: src/gpu/gl/GrGLSL.cpp

Issue 648463002: Remove tab parameter from GrGLSLMulVarBy4f function (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix comment Created 6 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
« no previous file with comments | « src/gpu/gl/GrGLSL.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLSL.cpp
diff --git a/src/gpu/gl/GrGLSL.cpp b/src/gpu/gl/GrGLSL.cpp
index 6c8f88360c0a49e2a071ff01a84b03b12192a9da..866a0d13d3a03dbc408c79913b1e4cd2143dd5bb 100644
--- a/src/gpu/gl/GrGLSL.cpp
+++ b/src/gpu/gl/GrGLSL.cpp
@@ -69,30 +69,14 @@ const char* GrGetGLSLVersionDecl(const GrGLContextInfo& info) {
}
}
-namespace {
- void append_tabs(SkString* outAppend, int tabCnt) {
- static const char kTabs[] = "\t\t\t\t\t\t\t\t";
- while (tabCnt) {
- int cnt = SkTMin((int)SK_ARRAY_COUNT(kTabs), tabCnt);
- outAppend->append(kTabs, cnt);
- tabCnt -= cnt;
- }
- }
-}
-
-void GrGLSLMulVarBy4f(SkString* outAppend,
- unsigned tabCnt,
- const char* vec4VarName,
- const GrGLSLExpr4& mulFactor) {
+void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSLExpr4& mulFactor) {
if (mulFactor.isOnes()) {
*outAppend = SkString();
}
- append_tabs(outAppend, tabCnt);
-
if (mulFactor.isZeros()) {
- outAppend->appendf("%s = vec4(0);\n", vec4VarName);
+ outAppend->appendf("%s = vec4(0);", vec4VarName);
} else {
- outAppend->appendf("%s *= %s;\n", vec4VarName, mulFactor.c_str());
+ outAppend->appendf("%s *= %s;", vec4VarName, mulFactor.c_str());
}
}
« no previous file with comments | « src/gpu/gl/GrGLSL.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698