Put SkImageInfo on SkImage to avoid cost of reconstructing for queries.

Previously calling SkImage::alphaType(), for example, woult call
the virtual SkImage_Base::onImageInfo() which would construct
and return a temporary SkImageInfo. This often meant ref-ing a
SkColorSpace.


Change-Id: I54975a6b20dea5bc84739068df0c81c022a12067
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202711
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
19 files changed