Add GrContext getter to SkSurface.

Currently this is possible by getting the canvas off of surface and then
getting the context off of the canvas. However, if in the future we wanted
a surface that didn't have a canvas (maybe something that looked like a
mutible image that only had a writePixels call), this would allow us to
still get the GrContext.

Bug: skia:10118
Change-Id: Ie8504bb708c1e4532edc8c7832ead86ae711e237
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289479
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
6 files changed