diff options
author | Robert Phillips <robertphillips@google.com> | 2018-01-16 09:21:01 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-16 15:12:01 +0000 |
commit | f9bec208cd1a708b603340369530cf6eacfda244 (patch) | |
tree | 63958818497de64bac0927f150bdeaae57b10c73 | |
parent | cf3a617350c5be1b861d0975e358f3324ee9ac82 (diff) |
Fix --preAbandonGpuContext bots
Change-Id: I6c6375b1c3c74c07d0723606f905fbbef233a4f1
Reviewed-on: https://skia-review.googlesource.com/94860
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
-rw-r--r-- | src/gpu/GrProxyProvider.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gpu/GrProxyProvider.cpp b/src/gpu/GrProxyProvider.cpp index 942d17ff61..1255f7e8e3 100644 --- a/src/gpu/GrProxyProvider.cpp +++ b/src/gpu/GrProxyProvider.cpp @@ -312,6 +312,10 @@ sk_sp<GrTextureProxy> GrProxyProvider::createProxy(const GrSurfaceDesc& desc, sk_sp<GrTextureProxy> GrProxyProvider::createWrappedTextureProxy(const GrBackendTexture& backendTex, GrSurfaceOrigin origin) { + if (this->isAbandoned()) { + return nullptr; + } + sk_sp<GrTexture> texture(fResourceProvider->wrapBackendTexture(backendTex)); if (!texture) { return nullptr; @@ -324,6 +328,10 @@ sk_sp<GrTextureProxy> GrProxyProvider::createWrappedTextureProxy(const GrBackend sk_sp<GrTextureProxy> GrProxyProvider::createWrappedTextureProxy(const GrBackendTexture& tex, GrSurfaceOrigin origin, int sampleCnt) { + if (this->isAbandoned()) { + return nullptr; + } + sk_sp<GrTexture> texture(fResourceProvider->wrapRenderableBackendTexture(tex, sampleCnt)); if (!texture) { return nullptr; @@ -336,6 +344,10 @@ sk_sp<GrTextureProxy> GrProxyProvider::createWrappedTextureProxy(const GrBackend sk_sp<GrSurfaceProxy> GrProxyProvider::createWrappedRenderTargetProxy( const GrBackendRenderTarget& backendRT, GrSurfaceOrigin origin) { + if (this->isAbandoned()) { + return nullptr; + } + sk_sp<GrRenderTarget> rt(fResourceProvider->wrapBackendRenderTarget(backendRT)); if (!rt) { return nullptr; @@ -349,6 +361,10 @@ sk_sp<GrSurfaceProxy> GrProxyProvider::createWrappedRenderTargetProxy( sk_sp<GrSurfaceProxy> GrProxyProvider::createWrappedRenderTargetProxy(const GrBackendTexture& tex, GrSurfaceOrigin origin, int sampleCnt) { + if (this->isAbandoned()) { + return nullptr; + } + sk_sp<GrRenderTarget> rt(fResourceProvider->wrapBackendTextureAsRenderTarget(tex, sampleCnt)); if (!rt) { return nullptr; |