diff options
author | 2017-04-20 19:31:52 -0400 | |
---|---|---|
committer | 2017-04-20 23:57:21 +0000 | |
commit | cb67096b61f699b047fe8635984db1ac708a7b99 (patch) | |
tree | 3a8bda0962ad77d0d9ccb1d89c15f70578a7fe78 /src/sksl/ir/SkSLFunctionCall.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/SkSLFunctionCall.h')
-rw-r--r-- | src/sksl/ir/SkSLFunctionCall.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sksl/ir/SkSLFunctionCall.h b/src/sksl/ir/SkSLFunctionCall.h index 1a5c6fd693..44f8c7ed5a 100644 --- a/src/sksl/ir/SkSLFunctionCall.h +++ b/src/sksl/ir/SkSLFunctionCall.h @@ -23,6 +23,15 @@ struct FunctionCall : public Expression { , fFunction(std::move(function)) , fArguments(std::move(arguments)) {} + bool hasSideEffects() const override { + for (const auto& arg : fArguments) { + if (arg->hasSideEffects()) { + return true; + } + } + return fFunction.fModifiers.fFlags & Modifiers::kHasSideEffects_Flag; + } + String description() const override { String result = fFunction.fName + "("; String separator; |