Remove unused context argument from compareConstant.

Change-Id: Ia49b9dceccb83f8316698ba13d0920a988335010
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/352040
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
John Stiles 2021-01-08 14:00:48 -05:00 committed by Skia Commit-Bot
parent 416ebde552
commit 7f39983c95
7 changed files with 8 additions and 14 deletions

View File

@ -1807,7 +1807,7 @@ std::unique_ptr<Expression> IRGenerator::constantFoldVector(const Expression& le
if (op == Token::Kind::TK_EQEQ || op == Token::Kind::TK_NEQ) {
bool equality = (op == Token::Kind::TK_EQEQ);
switch (left.compareConstant(fContext, right)) {
switch (left.compareConstant(right)) {
case Expression::ComparisonResult::kNotEqual:
equality = !equality;
[[fallthrough]];
@ -1990,7 +1990,7 @@ std::unique_ptr<Expression> IRGenerator::constantFold(const Expression& left,
return nullptr;
}
switch (left.compareConstant(fContext, right)) {
switch (left.compareConstant(right)) {
case Expression::ComparisonResult::kNotEqual:
equality = !equality;
[[fallthrough]];

View File

@ -48,8 +48,7 @@ public:
return true;
}
ComparisonResult compareConstant(const Context& context,
const Expression& other) const override {
ComparisonResult compareConstant(const Expression& other) const override {
if (!other.is<BoolLiteral>()) {
return ComparisonResult::kUnknown;
}

View File

@ -67,8 +67,7 @@ std::unique_ptr<Expression> Constructor::SimplifyConversion(const Type& construc
return nullptr;
}
Expression::ComparisonResult Constructor::compareConstant(const Context& context,
const Expression& other) const {
Expression::ComparisonResult Constructor::compareConstant(const Expression& other) const {
if (!other.is<Constructor>()) {
return ComparisonResult::kUnknown;
}

View File

@ -104,8 +104,7 @@ public:
return true;
}
ComparisonResult compareConstant(const Context& context,
const Expression& other) const override;
ComparisonResult compareConstant(const Expression& other) const override;
template <typename ResultType>
ResultType getVecComponent(int index) const;

View File

@ -113,8 +113,7 @@ public:
kNotEqual,
kEqual
};
virtual ComparisonResult compareConstant(const Context& context,
const Expression& other) const {
virtual ComparisonResult compareConstant(const Expression& other) const {
return ComparisonResult::kUnknown;
}

View File

@ -55,8 +55,7 @@ public:
return INHERITED::coercionCost(target);
}
ComparisonResult compareConstant(const Context& context,
const Expression& other) const override {
ComparisonResult compareConstant(const Expression& other) const override {
if (!other.is<FloatLiteral>()) {
return ComparisonResult::kUnknown;
}

View File

@ -50,8 +50,7 @@ public:
return true;
}
ComparisonResult compareConstant(const Context& context,
const Expression& other) const override {
ComparisonResult compareConstant(const Expression& other) const override {
if (!other.is<IntLiteral>()) {
return ComparisonResult::kUnknown;
}