Extract code common to Renderer and GPU for Fallback

Extract this code and use it on the GPU side in preparation
to have both GPU and Renderer use it.

Change-Id: I1c6f64b9096b2dbccfc09e9d9dc099c2a10ed6d7
Reviewed-on: https://skia-review.googlesource.com/154560
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
5 files changed