aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLGLSLCodeGenerator.cpp
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-09-15 16:55:33 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-15 21:22:54 +0000
commit9752c3c3079140d7dbcf1fb2feb513f1e139a03a (patch)
tree1600689dfb45148c7cf610205f5a56346c5cfdf3 /src/sksl/SkSLGLSLCodeGenerator.cpp
parent7031b247c9fe0cb8fa32129f9bc24fea2043cee2 (diff)
Minor fixes to SkSL precisions
No-Presubmit: true No-Tree-Checks: true Bug: skia: Change-Id: Ife95d3ba457f79c00bf4fdd54af898a3a50402aa Reviewed-on: https://skia-review.googlesource.com/47241 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/SkSLGLSLCodeGenerator.cpp')
-rw-r--r--src/sksl/SkSLGLSLCodeGenerator.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sksl/SkSLGLSLCodeGenerator.cpp b/src/sksl/SkSLGLSLCodeGenerator.cpp
index a30262f3fe..c6b4806245 100644
--- a/src/sksl/SkSLGLSLCodeGenerator.cpp
+++ b/src/sksl/SkSLGLSLCodeGenerator.cpp
@@ -1025,6 +1025,9 @@ bool GLSLCodeGenerator::generateCode() {
fOut = rawOut;
write_stringstream(fHeader, *rawOut);
+ if (this->usesPrecisionModifiers()) {
+ this->writeLine("precision mediump float;");
+ }
write_stringstream(body, *rawOut);
return true;
}