GrColorSpaceInfo stores SkAlphaType.
This means GrSurfaceContext's know their alpha type.
All GrRenderTargetSurfaceContexts are kPremul.
Make GrTextureProducer store GrColorSpaceInfo.
Bug: skia:7580
Change-Id: I5ff321ef52c0edd32e5fac99dff95d44aa66f592
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223184
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrContextPriv.h b/src/gpu/GrContextPriv.h
index 7fbf8f8..932cd4b 100644
--- a/src/gpu/GrContextPriv.h
+++ b/src/gpu/GrContextPriv.h
@@ -74,6 +74,7 @@
void addOnFlushCallbackObject(GrOnFlushCallbackObject*);
sk_sp<GrSurfaceContext> makeWrappedSurfaceContext(sk_sp<GrSurfaceProxy>,
+ SkAlphaType,
sk_sp<SkColorSpace> = nullptr,
const SkSurfaceProps* = nullptr);
@@ -83,6 +84,7 @@
GrMipMapped,
SkBackingFit,
SkBudgeted,
+ SkAlphaType,
sk_sp<SkColorSpace> colorSpace = nullptr,
const SkSurfaceProps* = nullptr);
@@ -123,9 +125,10 @@
*/
static sk_sp<GrContext> MakeDDL(const sk_sp<GrContextThreadSafeProxy>&);
- sk_sp<GrTextureContext> makeBackendTextureContext(const GrBackendTexture& tex,
- GrSurfaceOrigin origin,
- sk_sp<SkColorSpace> colorSpace);
+ sk_sp<GrTextureContext> makeBackendTextureContext(const GrBackendTexture&,
+ GrSurfaceOrigin,
+ SkAlphaType,
+ sk_sp<SkColorSpace>);
// These match the definitions in SkSurface & GrSurface.h, for whence they came
typedef void* ReleaseContext;