diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-09-18 14:10:39 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-18 18:32:13 +0000 |
commit | f7b8820dc813d1eb0b6b43fe4581dded0da38caf (patch) | |
tree | 518d313a9fa571a9f9ca26af7c381664694a4706 /src/sksl/SkSLGLSLCodeGenerator.h | |
parent | 47a540f503bc722393b61c4b822e95b17f200125 (diff) |
re-land of new SkSL precisions
Bug: skia:
Change-Id: Ic1deb3db2cbda6ca45f93dee99832971a36a2119
Reviewed-on: https://skia-review.googlesource.com/47841
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/SkSLGLSLCodeGenerator.h')
-rw-r--r-- | src/sksl/SkSLGLSLCodeGenerator.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/sksl/SkSLGLSLCodeGenerator.h b/src/sksl/SkSLGLSLCodeGenerator.h index 353cd66824..4813d0d155 100644 --- a/src/sksl/SkSLGLSLCodeGenerator.h +++ b/src/sksl/SkSLGLSLCodeGenerator.h @@ -96,9 +96,11 @@ protected: virtual void writeHeader(); - virtual void writePrecisionModifier(); + virtual bool usesPrecisionModifiers() const; - virtual void writeType(const Type& type); + virtual String getTypeName(const Type& type); + + void writeType(const Type& type); void writeExtension(const Extension& ext); @@ -118,6 +120,8 @@ protected: virtual void writeVarInitializer(const Variable& var, const Expression& value); + const char* getTypePrecision(const Type& type); + void writeTypePrecision(const Type& type); void writeVarDeclarations(const VarDeclarations& decl, bool global); @@ -134,7 +138,7 @@ protected: virtual void writeFunctionCall(const FunctionCall& c); - void writeConstructor(const Constructor& c); + void writeConstructor(const Constructor& c, Precedence parentPrecedence); void writeFieldAccess(const FieldAccess& f); |