aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLGLSLCodeGenerator.h
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-08-16 16:41:30 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-16 23:05:15 +0000
commit88d99c63878c2d3d340120f0321676f72afcb4f0 (patch)
tree5b957dbf2f78ef7a15aa3810f8922c915508683f /src/sksl/SkSLGLSLCodeGenerator.h
parenta26d219a929f4e70f8597dfd57a53348c4bba905 (diff)
Switched highp float to highfloat and mediump float to half.
The ultimate goal is to end up with "float" and "half", but this intermediate step uses "highfloat" so that it is clear if I missed a "float" somewhere. Once this lands, a subsequent CL will switch all "highfloats" back to "floats". Bug: skia: Change-Id: Ia13225c7a0a0a2901e07665891c473d2500ddcca Reviewed-on: https://skia-review.googlesource.com/31000 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/sksl/SkSLGLSLCodeGenerator.h')
-rw-r--r--src/sksl/SkSLGLSLCodeGenerator.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/sksl/SkSLGLSLCodeGenerator.h b/src/sksl/SkSLGLSLCodeGenerator.h
index e10299aa14..c377d29766 100644
--- a/src/sksl/SkSLGLSLCodeGenerator.h
+++ b/src/sksl/SkSLGLSLCodeGenerator.h
@@ -94,9 +94,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);
@@ -116,6 +118,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);
@@ -132,7 +136,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);