Allow WGSL expression generators to emit extra statements.

Previously, we would write expressions directly into the code at
exactly the spot where they were needed.

Now, the WGSL expression-functions are named `assembleXxxxxx` and
you are expected to call them in between statements. They will
return a string for the passed-in Expression tree. This structure
also gives them latitude to emit helper statements as necessary
before the statement that will use the Expression.

At this CL, the assembleExpression cluster of methods all emit the
same text as before, and none of them emit helper statements. This
will change in followup CLs.

Bug: skia:14082
Change-Id: I1b8a91b998631c91d6668c0915b63f75c3bdd7ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/700225
Reviewed-by: Arman Uguray <armansito@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2 files changed