diff options
author | 2017-06-09 13:46:34 -0400 | |
---|---|---|
committer | 2017-06-12 14:32:40 +0000 | |
commit | b310fd597fc37dee888cfd5a760c4e156af08a6d (patch) | |
tree | 01a9f53a153eabf6945f59bec44f11f3eed1f68d /src/sksl/SkSLGLSLCodeGenerator.cpp | |
parent | 2ee0f42a4b678529d6d62a2619e66fec5e637412 (diff) |
fixed issue with SkSL dead code elimination
Bug: skia:6747
Change-Id: I8566f0f6822a452167079cca004730ec0db318a8
Reviewed-on: https://skia-review.googlesource.com/19275
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/SkSLGLSLCodeGenerator.cpp')
-rw-r--r-- | src/sksl/SkSLGLSLCodeGenerator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sksl/SkSLGLSLCodeGenerator.cpp b/src/sksl/SkSLGLSLCodeGenerator.cpp index c3168e3ed3..6381acb322 100644 --- a/src/sksl/SkSLGLSLCodeGenerator.cpp +++ b/src/sksl/SkSLGLSLCodeGenerator.cpp @@ -736,7 +736,7 @@ void GLSLCodeGenerator::writeIfStatement(const IfStatement& stmt) { void GLSLCodeGenerator::writeForStatement(const ForStatement& f) { this->write("for ("); - if (f.fInitializer) { + if (f.fInitializer && !f.fInitializer->isEmpty()) { this->writeStatement(*f.fInitializer); } else { this->write("; "); |