Reland "Check that the GrBackendFormat of a promise image is textureable."
This is a reland of commit 866bd64c1b
Original change's description:
> 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>
Bug: chromium:1311844
Change-Id: I01e2d0e4eb01ee7d97798db6eeff73fec76bf521
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532408
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
9cbadcd928
commit
7dd8c705a5
@ -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
|
||||
|
@ -1204,6 +1204,10 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(DDLTextureFlagsTest, reporter, ctxInfo) {
|
||||
REPORTER_ASSERT(reporter, !image);
|
||||
continue;
|
||||
}
|
||||
if (!context->priv().caps()->isFormatTexturable(format, format.textureType())) {
|
||||
REPORTER_ASSERT(reporter, !image);
|
||||
continue;
|
||||
}
|
||||
REPORTER_ASSERT(reporter, image);
|
||||
|
||||
GrTextureProxy* backingProxy = sk_gpu_test::GetTextureImageProxy(image.get(), context);
|
||||
|
Loading…
Reference in New Issue
Block a user