Use WGSL select for trivial ternary expressions only.

Previously the WGSL code generator would use a select statement
for statements like this if the called functions were marked as
$pure, because pure functions don't have side effects.

    half4 sampleColorY = (useCubic != 0)
        ? $cubic_filter_image(...)
        : $sample_image_subset(...);

Bug: chromium:1492472
Change-Id: I691b90dde48056ea8ac15f8238bf29a7e9a174c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/773697
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
12 files changed