diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-08-02 10:52:54 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-08-02 18:47:00 +0000 |
commit | dcba08e891f1766b047cf0dbe8bbd275d9f55d2b (patch) | |
tree | c53822e53f595ea7c886f1efb22a2835da368b79 /src/sksl/ir/SkSLIntLiteral.h | |
parent | d9971c0c20d9937f6eabbf03b7638916d8dd57d7 (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/ir/SkSLIntLiteral.h')
-rw-r--r-- | src/sksl/ir/SkSLIntLiteral.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sksl/ir/SkSLIntLiteral.h b/src/sksl/ir/SkSLIntLiteral.h index d8eba5573a..6199f96610 100644 --- a/src/sksl/ir/SkSLIntLiteral.h +++ b/src/sksl/ir/SkSLIntLiteral.h @@ -40,6 +40,13 @@ struct IntLiteral : public Expression { return fValue == i.fValue; } + int coercionCost(const Type& target) const override { + if (target.isUnsigned()) { + return 0; + } + return INHERITED::coercionCost(target); + } + const int64_t fValue; typedef Expression INHERITED; |