Don't require color type to wrap a texture/RT.
Change-Id: Ic6c0de262e13c3c3ea9e7777ccdd04f22ff6ae0a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280345
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp
index f239f0a..498c171 100644
--- a/src/gpu/GrResourceProvider.cpp
+++ b/src/gpu/GrResourceProvider.cpp
@@ -279,7 +279,6 @@
}
sk_sp<GrTexture> GrResourceProvider::wrapBackendTexture(const GrBackendTexture& tex,
- GrColorType colorType,
GrWrapOwnership ownership,
GrWrapCacheable cacheable,
GrIOType ioType) {
@@ -287,7 +286,7 @@
if (this->isAbandoned()) {
return nullptr;
}
- return fGpu->wrapBackendTexture(tex, colorType, ownership, cacheable, ioType);
+ return fGpu->wrapBackendTexture(tex, ownership, cacheable, ioType);
}
sk_sp<GrTexture> GrResourceProvider::wrapCompressedBackendTexture(const GrBackendTexture& tex,
@@ -304,21 +303,19 @@
sk_sp<GrTexture> GrResourceProvider::wrapRenderableBackendTexture(const GrBackendTexture& tex,
int sampleCnt,
- GrColorType colorType,
GrWrapOwnership ownership,
GrWrapCacheable cacheable) {
ASSERT_SINGLE_OWNER
if (this->isAbandoned()) {
return nullptr;
}
- return fGpu->wrapRenderableBackendTexture(tex, sampleCnt, colorType, ownership, cacheable);
+ return fGpu->wrapRenderableBackendTexture(tex, sampleCnt, ownership, cacheable);
}
sk_sp<GrRenderTarget> GrResourceProvider::wrapBackendRenderTarget(
- const GrBackendRenderTarget& backendRT, GrColorType colorType)
-{
+ const GrBackendRenderTarget& backendRT) {
ASSERT_SINGLE_OWNER
- return this->isAbandoned() ? nullptr : fGpu->wrapBackendRenderTarget(backendRT, colorType);
+ return this->isAbandoned() ? nullptr : fGpu->wrapBackendRenderTarget(backendRT);
}
sk_sp<GrRenderTarget> GrResourceProvider::wrapVulkanSecondaryCBAsRenderTarget(
@@ -530,12 +527,11 @@
}
sk_sp<GrRenderTarget> GrResourceProvider::wrapBackendTextureAsRenderTarget(
- const GrBackendTexture& tex, int sampleCnt, GrColorType colorType)
-{
+ const GrBackendTexture& tex, int sampleCnt) {
if (this->isAbandoned()) {
return nullptr;
}
- return fGpu->wrapBackendTextureAsRenderTarget(tex, sampleCnt, colorType);
+ return fGpu->wrapBackendTextureAsRenderTarget(tex, sampleCnt);
}
std::unique_ptr<GrSemaphore> SK_WARN_UNUSED_RESULT GrResourceProvider::makeSemaphore(