Add return value to doLazyInstantiation to know if it succeedes.
This allows us to return nullptr in places where we try to instantiate
immediately and it fails.
Bug: skia:
Change-Id: Ic3da26b0e6270b3de114d80533f0580b4d6bf0e7
Reviewed-on: https://skia-review.googlesource.com/99381
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrProxyProvider.cpp b/src/gpu/GrProxyProvider.cpp
index 1267750..7e9c251 100644
--- a/src/gpu/GrProxyProvider.cpp
+++ b/src/gpu/GrProxyProvider.cpp
@@ -367,7 +367,9 @@
if (fResourceProvider) {
// In order to reuse code we always create a lazy proxy. When we aren't in DDL mode however,
// we're better off instantiating the proxy immediately here.
- proxy->priv().doLazyInstantiation(fResourceProvider);
+ if (!proxy->priv().doLazyInstantiation(fResourceProvider)) {
+ return nullptr;
+ }
}
return proxy;
}