aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLCPPCodeGenerator.cpp
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-08-02 10:52:54 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-02 18:47:00 +0000
commitdcba08e891f1766b047cf0dbe8bbd275d9f55d2b (patch)
treec53822e53f595ea7c886f1efb22a2835da368b79 /src/sksl/SkSLCPPCodeGenerator.cpp
parentd9971c0c20d9937f6eabbf03b7638916d8dd57d7 (diff)
Revert "Revert "support for 'half' types in sksl, plus general numeric type improvements""
This reverts commit 0e9605542444a7653359f4fc610f7620df9f6313. Bug: skia: Change-Id: Id45d091c1950887316c901ed9c9281181f346bcf Reviewed-on: https://skia-review.googlesource.com/29602 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/SkSLCPPCodeGenerator.cpp')
-rw-r--r--src/sksl/SkSLCPPCodeGenerator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sksl/SkSLCPPCodeGenerator.cpp b/src/sksl/SkSLCPPCodeGenerator.cpp
index 2276ce372e..76faef9aae 100644
--- a/src/sksl/SkSLCPPCodeGenerator.cpp
+++ b/src/sksl/SkSLCPPCodeGenerator.cpp
@@ -181,6 +181,10 @@ String CPPCodeGenerator::getSamplerHandle(const Variable& var) {
ABORT("should have found sampler in parameters\n");
}
+void CPPCodeGenerator::writeIntLiteral(const IntLiteral& i) {
+ this->write(to_string((int32_t) i.fValue));
+}
+
void CPPCodeGenerator::writeVariableReference(const VariableReference& ref) {
switch (ref.fVariable.fModifiers.fLayout.fBuiltin) {
case SK_INCOLOR_BUILTIN: