Make rest of GrGpu::wrapBackend* methods take a GrColorType
This CL is intended to further wean Ganesh off of using the GrBackendTexture's pixel config
Bug: skia:6718
Change-Id: I593c0c73922fb76045e379214e20adb1f17ea215
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227780
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp
index d49721c..b80f9f1 100644
--- a/src/gpu/GrResourceProvider.cpp
+++ b/src/gpu/GrResourceProvider.cpp
@@ -334,6 +334,7 @@
}
sk_sp<GrTexture> GrResourceProvider::wrapBackendTexture(const GrBackendTexture& tex,
+ GrColorType colorType,
GrWrapOwnership ownership,
GrWrapCacheable cacheable,
GrIOType ioType) {
@@ -341,7 +342,7 @@
if (this->isAbandoned()) {
return nullptr;
}
- return fGpu->wrapBackendTexture(tex, ownership, cacheable, ioType);
+ return fGpu->wrapBackendTexture(tex, colorType, ownership, cacheable, ioType);
}
sk_sp<GrTexture> GrResourceProvider::wrapRenderableBackendTexture(const GrBackendTexture& tex,
@@ -357,10 +358,10 @@
}
sk_sp<GrRenderTarget> GrResourceProvider::wrapBackendRenderTarget(
- const GrBackendRenderTarget& backendRT)
+ const GrBackendRenderTarget& backendRT, GrColorType colorType)
{
ASSERT_SINGLE_OWNER
- return this->isAbandoned() ? nullptr : fGpu->wrapBackendRenderTarget(backendRT);
+ return this->isAbandoned() ? nullptr : fGpu->wrapBackendRenderTarget(backendRT, colorType);
}
sk_sp<GrRenderTarget> GrResourceProvider::wrapVulkanSecondaryCBAsRenderTarget(
@@ -533,12 +534,12 @@
}
sk_sp<GrRenderTarget> GrResourceProvider::wrapBackendTextureAsRenderTarget(
- const GrBackendTexture& tex, int sampleCnt)
+ const GrBackendTexture& tex, int sampleCnt, GrColorType colorType)
{
if (this->isAbandoned()) {
return nullptr;
}
- return fGpu->wrapBackendTextureAsRenderTarget(tex, sampleCnt);
+ return fGpu->wrapBackendTextureAsRenderTarget(tex, sampleCnt, colorType);
}
sk_sp<GrSemaphore> SK_WARN_UNUSED_RESULT GrResourceProvider::makeSemaphore(bool isOwned) {