Make ManagedBackendTexture fail on invalid GrBackendTexture
Makes it more sensible.
A bunch of call sites we're already written to expect this. Update
some others.
Change-Id: I77c28045ebf01e6aa9d92d2ebc37287604ec10c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332544
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/tests/GrPorterDuffTest.cpp b/tests/GrPorterDuffTest.cpp
index c7f2a44..0adb595 100644
--- a/tests/GrPorterDuffTest.cpp
+++ b/tests/GrPorterDuffTest.cpp
@@ -1001,6 +1001,10 @@
auto mbet = sk_gpu_test::ManagedBackendTexture::MakeWithoutData(
ctx, 100, 100, kRGBA_8888_SkColorType, GrMipmapped::kNo, GrRenderable::kNo);
+ if (!mbet) {
+ ERRORF(reporter, "Could not make texture.");
+ return;
+ }
GrXferProcessor::DstProxyView fakeDstProxyView;
{
sk_sp<GrTextureProxy> proxy = proxyProvider->wrapBackendTexture(