diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-04-20 19:31:52 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-20 23:57:21 +0000 |
commit | cb67096b61f699b047fe8635984db1ac708a7b99 (patch) | |
tree | 3a8bda0962ad77d0d9ccb1d89c15f70578a7fe78 /src/sksl/ir/SkSLIntLiteral.h | |
parent | e79b473714866682dea85b66c005c5bb2ff6a397 (diff) |
Improved skslc optimizer, particularly around vectors.
BUG=skia:
Change-Id: Idb364d9198f2ff84aad1eb68e236fb45ec1c86b7
Reviewed-on: https://skia-review.googlesource.com/8000
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Diffstat (limited to 'src/sksl/ir/SkSLIntLiteral.h')
-rw-r--r-- | src/sksl/ir/SkSLIntLiteral.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sksl/ir/SkSLIntLiteral.h b/src/sksl/ir/SkSLIntLiteral.h index 2322a3d40a..3a95ed65ba 100644 --- a/src/sksl/ir/SkSLIntLiteral.h +++ b/src/sksl/ir/SkSLIntLiteral.h @@ -23,11 +23,15 @@ struct IntLiteral : public Expression { : INHERITED(position, kIntLiteral_Kind, type ? *type : *context.fInt_Type) , fValue(value) {} - virtual String description() const override { + String description() const override { return to_string(fValue); } - bool isConstant() const override { + bool hasSideEffects() const override { + return false; + } + + bool isConstant() const override { return true; } |