diff options
Diffstat (limited to 'src/sksl/ir/SkSLConstructor.h')
-rw-r--r-- | src/sksl/ir/SkSLConstructor.h | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/sksl/ir/SkSLConstructor.h b/src/sksl/ir/SkSLConstructor.h index 691bea123a..63c692b88e 100644 --- a/src/sksl/ir/SkSLConstructor.h +++ b/src/sksl/ir/SkSLConstructor.h @@ -9,9 +9,6 @@ #define SKSL_CONSTRUCTOR #include "SkSLExpression.h" -#include "SkSLFloatLiteral.h" -#include "SkSLIntLiteral.h" -#include "SkSLIRGenerator.h" namespace SkSL { @@ -24,20 +21,6 @@ struct Constructor : public Expression { : INHERITED(position, kConstructor_Kind, type) , fArguments(std::move(arguments)) {} - virtual std::unique_ptr<Expression> constantPropagate( - const IRGenerator& irGenerator, - const DefinitionMap& definitions) override { - if (fArguments.size() == 1 && fArguments[0]->fKind == Expression::kIntLiteral_Kind && - // promote float(1) to 1.0 - fType == *irGenerator.fContext.fFloat_Type) { - int64_t intValue = ((IntLiteral&) *fArguments[0]).fValue; - return std::unique_ptr<Expression>(new FloatLiteral(irGenerator.fContext, - fPosition, - intValue)); - } - return nullptr; - } - SkString description() const override { SkString result = fType.description() + "("; SkString separator; @@ -59,7 +42,7 @@ struct Constructor : public Expression { return true; } - std::vector<std::unique_ptr<Expression>> fArguments; + const std::vector<std::unique_ptr<Expression>> fArguments; typedef Expression INHERITED; }; |