Revert "Remove deferred proxy machinery"
This reverts commit a3987cc5873c9bce758fa3843bb801c95d282bbd.
Reason for revert: Keeping it
Original change's description:
> Remove deferred proxy machinery
>
> These aren't used any more in favor of lazy proxies.
>
> Bug: skia:11288
> Change-Id: I992e1a3dd343e0ebc7f3a4f18c0054453dfebbaf
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366896
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
Bug: skia:11288
Change-Id: Iafa9ed18a772e451349dfad61ee462df963028be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368376
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
diff --git a/src/gpu/GrResourceAllocator.cpp b/src/gpu/GrResourceAllocator.cpp
index d7e6851..2a1d44d 100644
--- a/src/gpu/GrResourceAllocator.cpp
+++ b/src/gpu/GrResourceAllocator.cpp
@@ -94,7 +94,12 @@
if (Interval* intvl = fIntvlHash.find(proxy->uniqueID().asUInt())) {
// Revise the interval for an existing use
#ifdef SK_DEBUG
- if (isDirectDstRead) {
+ if (0 == start && 0 == end) {
+ // This interval is for the initial upload to a deferred proxy. Due to the vagaries
+ // of how deferred proxies are collected they can appear as uploads multiple times
+ // in a single opsTasks' list and as uploads in several opsTasks.
+ SkASSERT(0 == intvl->start());
+ } else if (isDirectDstRead) {
// Direct reads from the render target itself should occur w/in the existing
// interval
SkASSERT(intvl->start() <= start && intvl->end() >= end);