Decouple SkImage and Graphite backend
Static factories moved:
- SkImage::MakeGraphiteFromBackendTexture -> SkImages::AdoptTextureFrom
- SkImage::MakeGraphiteFromYUVABackendTextures -> SkImages::TextureFromYUVATextures
- SkImage::MakeGraphiteFromYUVAPixmaps -> SkImages::TextureFromYUVAPixmaps
- SkImage::MakeGraphitePromiseTexture -> SkImages::PromiseTextureFrom
The Graphite version of SkImage::makeTextureImage has been moved to
SkImages::TextureFromImage.
The graphite version of SkImage::onMakeColorTypeAndColorSpace does
does not automatically upload the image to the Graphite backend
anymore (The Ganesh backend already does not do this).
I also changed RequiredImageProperties to RequiredProperties; in
addition to a rename to remove the redundant Image (e.g.
SkImage::RequiredImageProperties says Image twice), it changes
the use of a gpu-only enum (skgpu::Mipmapped) to a boolean. The
reason this is needed is that it causes
#include "include/gpu/GpuTypes.h" to leak into non-GPU code
(e.g. SkImage_Raster.h").
This removes all the `#if defined(SK_GRAPHITE)` from SkImage
related code by always defining those methods (e.g. in SkImage_Base)
and stubbing them out as necessary (which they mostly were anyway).
Change-Id: Ic5c351f7b3b24fa45c7eda1227822e0dfc7b9adb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/695303
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
44 files changed