Carve some helper functions off of GPUSink (take 2)

I'm adding a new DDL Sink and would like to reuse this functionality.

TBR=egdaniel@google.com
Change-Id: I17ae929557400be4edd8df78ab6580872024bc15
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270799
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2 files changed