diff options
Diffstat (limited to 'src/gpu/GrProxyProvider.cpp')
-rw-r--r-- | src/gpu/GrProxyProvider.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gpu/GrProxyProvider.cpp b/src/gpu/GrProxyProvider.cpp index d86f9bcb9e..c9617ad9c3 100644 --- a/src/gpu/GrProxyProvider.cpp +++ b/src/gpu/GrProxyProvider.cpp @@ -131,6 +131,10 @@ sk_sp<GrTextureProxy> GrProxyProvider::createTextureProxy(const GrSurfaceDesc& d const GrMipLevel& mipLevel) { ASSERT_SINGLE_OWNER + if (this->isAbandoned()) { + return nullptr; + } + sk_sp<GrTexture> tex = fResourceProvider->createTexture(desc, budgeted, mipLevel); if (!tex) { return nullptr; @@ -143,6 +147,12 @@ sk_sp<GrTextureProxy> GrProxyProvider::createTextureProxy( const GrSurfaceDesc& desc, SkBudgeted budgeted, const GrMipLevel texels[], int mipLevelCount, SkDestinationSurfaceColorMode mipColorMode) { + ASSERT_SINGLE_OWNER + + if (this->isAbandoned()) { + return nullptr; + } + sk_sp<GrTexture> tex(fResourceProvider->createTexture(desc, budgeted, texels, mipLevelCount, mipColorMode)); |