Add checks that the GrResourceAllocator is operating as expected
With explicit resource allocation there should be no explicit instantiating at flush time. There are, however, still several instances where instantiate is called outside of testing (e.g., readSurfacePixels and writeSurfacePixels).
Change-Id: Ic459a550ca85048f66d6a1eb7d601411f83c6e32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204721
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/tests/TextureProxyTest.cpp b/tests/TextureProxyTest.cpp
index 9e6067e..11e4f29 100644
--- a/tests/TextureProxyTest.cpp
+++ b/tests/TextureProxyTest.cpp
@@ -46,7 +46,7 @@
sk_sp<GrTextureProxy> proxy =
proxyProvider->createProxy(format, desc, kBottomLeft_GrSurfaceOrigin, fit,
- SkBudgeted::kYes);
+ SkBudgeted::kYes, GrInternalSurfaceFlags::kNoPendingIO);
// Only budgeted & wrapped external proxies get to carry uniqueKeys
REPORTER_ASSERT(reporter, !proxy->getUniqueKey().isValid());
return proxy;
@@ -59,7 +59,8 @@
ctx->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType);
sk_sp<GrTextureProxy> proxy =
- proxyProvider->createProxy(format, desc, kBottomLeft_GrSurfaceOrigin, fit, SkBudgeted::kYes);
+ proxyProvider->createProxy(format, desc, kBottomLeft_GrSurfaceOrigin, fit,
+ SkBudgeted::kYes, GrInternalSurfaceFlags::kNoPendingIO);
// Only budgeted & wrapped external proxies get to carry uniqueKeys
REPORTER_ASSERT(reporter, !proxy->getUniqueKey().isValid());
return proxy;