diff options
author | 2017-08-16 16:41:30 -0400 | |
---|---|---|
committer | 2017-08-16 23:05:15 +0000 | |
commit | 88d99c63878c2d3d340120f0321676f72afcb4f0 (patch) | |
tree | 5b957dbf2f78ef7a15aa3810f8922c915508683f /src/sksl/SkSLHCodeGenerator.cpp | |
parent | a26d219a929f4e70f8597dfd57a53348c4bba905 (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/SkSLHCodeGenerator.cpp')
-rw-r--r-- | src/sksl/SkSLHCodeGenerator.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/sksl/SkSLHCodeGenerator.cpp b/src/sksl/SkSLHCodeGenerator.cpp index 50d242896a..b38e6c0edf 100644 --- a/src/sksl/SkSLHCodeGenerator.cpp +++ b/src/sksl/SkSLHCodeGenerator.cpp @@ -23,13 +23,15 @@ HCodeGenerator::HCodeGenerator(const Program* program, ErrorReporter* errors, St , fSectionAndParameterHelper(*program, *errors) {} String HCodeGenerator::ParameterType(const Type& type) { - if (type.fName == "float2") { + if (type.fName == "highfloat" || type.fName == "half") { + return "float"; + } else if (type.fName == "highfloat2" || type.fName == "half2") { return "SkPoint"; - } else if (type.fName == "int4") { + } else if (type.fName == "int4" || type.fName == "short4") { return "SkIRect"; - } else if (type.fName == "float4") { + } else if (type.fName == "highfloat4" || type.fName == "half4") { return "SkRect"; - } else if (type.fName == "float4x4") { + } else if (type.fName == "highfloat4x4" || type.fName == "half4x4") { return "SkMatrix44"; } else if (type.kind() == Type::kSampler_Kind) { return "sk_sp<GrTextureProxy>"; |