Check that the GrBackendFormat of a promise image is textureable.

Bug: chromium:1311844
Change-Id: I13bae71305ae9520851cd1ea38a1da737b934dd1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532196
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This commit is contained in:
Greg Daniel 2022-04-20 14:50:35 -04:00 committed by SkCQ
parent 6c76aeb21d
commit 866bd64c1b

View File

@ -757,6 +757,9 @@ sk_sp<GrTextureProxy> GrProxyProvider::CreatePromiseProxy(GrContextThreadSafePro
dimensions.fHeight > threadSafeProxy->priv().caps()->maxTextureSize()) {
return nullptr;
}
if (!threadSafeProxy->priv().caps()->isFormatTexturable(format, format.textureType())) {
return nullptr;
}
// Ganesh assumes that, when wrapping a mipmapped backend texture from a client, that its
// mipmaps are fully fleshed out.
GrMipmapStatus mipmapStatus = (GrMipmapped::kYes == mipmapped) ? GrMipmapStatus::kValid