calculate program hash in bulk

Now that Builder::Instructions are dense, it's easier to just calculate
Builder::hash() all at once when requested rather than as we go along.

(I'm planning to move the other use of Builder::Instruction hashing to
optimize() later too.)

Change-Id: I3124da5a3905291a907d08a12f62e794ed88e92d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269184
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2 files changed