Remove texture idle proc mechanism

Bug: skia:11369
Change-Id: I0d1a74cc64dd74486acbb69df529ccc0f8b63ef3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375202
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrGpuResource.h b/src/gpu/GrGpuResource.h
index ee61bbe..015f036 100644
--- a/src/gpu/GrGpuResource.h
+++ b/src/gpu/GrGpuResource.h
@@ -83,22 +83,7 @@
 
 private:
     void notifyWillBeZero(LastRemovedRef removedRef) const {
-        if (0 == this->getRefCnt() && this->hasNoCommandBufferUsages()) {
-            // At this point we better be the only thread accessing this resource.
-            // Trick out the notifyRefCntWillBeZero() call by adding back one more ref.
-            fRefCnt.fetch_add(+1, std::memory_order_relaxed);
-            static_cast<const DERIVED*>(this)->notifyRefCntWillBeZero();
-            // notifyRefCntWillBeZero() could have done anything, including re-refing this and
-            // passing on to another thread. Take away the ref-count we re-added above and see
-            // if we're back to zero.
-            // TODO: Consider making it so that refs can't be added and merge
-            //  notifyRefCntWillBeZero()/willRemoveLastRef() with notifyARefCntIsZero().
-            if (1 == fRefCnt.fetch_add(-1, std::memory_order_acq_rel)) {
-                static_cast<const DERIVED*>(this)->notifyARefCntIsZero(removedRef);
-            }
-        } else {
-            static_cast<const DERIVED*>(this)->notifyARefCntIsZero(removedRef);
-        }
+        static_cast<const DERIVED*>(this)->notifyARefCntIsZero(removedRef);
     }
 
     int32_t getRefCnt() const { return fRefCnt.load(std::memory_order_relaxed); }
@@ -294,15 +279,9 @@
 
     virtual size_t onGpuMemorySize() const = 0;
 
-    /**
-     * Called by GrIORef when a resource is about to lose its last ref
-     */
-    virtual void willRemoveLastRef() {}
-
     // See comments in CacheAccess and ResourcePriv.
     void setUniqueKey(const GrUniqueKey&);
     void removeUniqueKey();
-    void notifyRefCntWillBeZero() const;
     void notifyARefCntIsZero(LastRemovedRef removedRef) const;
     void removeScratchKey();
     void makeBudgeted();