Revert "Reintroduce deinstantiate lazy proxy types and use for promise images."
This reverts commit 8b40ac35b2ec31a61c751e610b891681df272283.
Reason for revert: breaks viz_unittests
Original change's description:
> Reintroduce deinstantiate lazy proxy types and use for promise images.
>
> This reverts a fraction of b2c5dae65df952999f0a12b9df80bc1433ffa19a to
> restore the deinstantiate lazy proxy type, supporting implementation,
> and tests.
>
> Use them for promise images to avoid thread safety issues for promise
> image resources. Makes promise image instantiation callbacks do a thread
> safe unref of their fulfilled GrTexture in GrResourceCache. The
> GrResourceCache mechanism for receiving unref messages is extended to
> allow multiple pending unrefs. All this is new.
>
>
> Bug: skia:8800
> Change-Id: I7b1d4fea13c053b6fbbd39c0c6eaf567b8bf81f1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199002
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: Iba960efba4290a284294c62d0470ad7e932c174a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8800
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200460
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index a1af2b3..9bd5415 100644
--- a/tests/ResourceCacheTest.cpp
+++ b/tests/ResourceCacheTest.cpp
@@ -1545,18 +1545,18 @@
GrGpu* gpu = context->priv().getGpu();
TestResource* wrapped1 = TestResource::CreateWrapped(gpu, GrWrapCacheable::kYes);
- cache->insertDelayedResourceUnref(wrapped1);
+ cache->insertCrossContextGpuResource(wrapped1);
REPORTER_ASSERT(reporter, 1 == TestResource::NumAlive());
TestResource* wrapped2 = TestResource::CreateWrapped(gpu, GrWrapCacheable::kYes);
- cache->insertDelayedResourceUnref(wrapped2);
+ cache->insertCrossContextGpuResource(wrapped2);
// An uncacheable cross-context should not be purged as soon as we drop our ref. This
// is because inserting it as a cross-context resource actually holds a ref until the
// message is received.
TestResource* wrapped3 = TestResource::CreateWrapped(gpu, GrWrapCacheable::kNo);
- cache->insertDelayedResourceUnref(wrapped3);
+ cache->insertCrossContextGpuResource(wrapped3);
REPORTER_ASSERT(reporter, 3 == TestResource::NumAlive());