Fix comma operator support with matrices in Metal.

MetalCodeGen would incorrectly identify `(someMatrix, someScalar)` as a
math operation between `someMatrix` and `someScalar` and attempt to
convert `someScalar` to a matrix. If `someScalar` was a Boolean type,
this would lead to an assertion.

The binary expression is now checked more thoroughly before converting
the scalar into a matrix.

Change-Id: Id7e104d5533d8c43375927d4815b83e1a3c36be1
Bug: skia:11125
Auto-Submit: John Stiles <>
Commit-Queue: Brian Osman <>
Reviewed-by: Brian Osman <>
5 files changed