diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2018-03-28 15:16:15 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-29 13:41:25 +0000 |
commit | 23463004dfbcaf8e0bbf28d405c69b45bca8d9c8 (patch) | |
tree | 37df09ba2e1e22e6c5514e8b1bf24857ad581fbf /src/sksl | |
parent | 0090ef6a837f339ecc8b1d5e1e50697fbcd2e76a (diff) |
fixed type mismatches in SkSL comparison operators
Bug: skia:
Change-Id: I8f05088c561a80549264f7a65cb8161bbe7d8f4c
Reviewed-on: https://skia-review.googlesource.com/116982
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl')
-rw-r--r-- | src/sksl/SkSLIRGenerator.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/sksl/SkSLIRGenerator.cpp b/src/sksl/SkSLIRGenerator.cpp index 815ec152cd..56d8e5e952 100644 --- a/src/sksl/SkSLIRGenerator.cpp +++ b/src/sksl/SkSLIRGenerator.cpp @@ -1092,15 +1092,18 @@ static bool determine_binary_type(const Context& context, return right.canCoerceTo(left); case Token::EQEQ: // fall through case Token::NEQ: - if (left == right) { + if (right.canCoerceTo(left)) { *outLeftType = &left; + *outRightType = &left; + *outResultType = context.fBool_Type.get(); + return true; + } if (left.canCoerceTo(right)) { + *outLeftType = &right; *outRightType = &right; *outResultType = context.fBool_Type.get(); return true; } - isLogical = true; - validMatrixOrVectorOp = true; - break; + return false; case Token::LT: // fall through case Token::GT: // fall through case Token::LTEQ: // fall through |