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>
diff --git a/src/gpu/GrProxyProvider.cpp b/src/gpu/GrProxyProvider.cpp
index 942d17f..1255f7e 100644
--- a/src/gpu/GrProxyProvider.cpp
+++ b/src/gpu/GrProxyProvider.cpp
@@ -312,6 +312,10 @@
 
 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 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<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(const GrBackendTexture& tex,
                                                                       GrSurfaceOrigin origin,
                                                                       int sampleCnt) {
+    if (this->isAbandoned()) {
+        return nullptr;
+    }
+
     sk_sp<GrRenderTarget> rt(fResourceProvider->wrapBackendTextureAsRenderTarget(tex, sampleCnt));
     if (!rt) {
         return nullptr;