Revert "ccpr: Unregister path listeners when their cache entries are evicted"

This reverts commit f30e49310fb8927d1acbfd39f6bdc5513aa7daa1.

Reason for revert: Slow down on skps across multiple bots and configs

Original change's description:
> ccpr: Unregister path listeners when their cache entries are evicted
> 
> Bug: skia:8452
> Change-Id: I5cf63c07481db38fc37e920e04ca140bad8966e4
> Reviewed-on: https://skia-review.googlesource.com/c/163560
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=bsalomon@google.com,brianosman@google.com,csmartdalton@google.com

Change-Id: I1f9859a02d9c78e4a83e68c6b26fd8d3badd2d8e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8452
Reviewed-on: https://skia-review.googlesource.com/c/163787
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/include/private/SkPathRef.h b/include/private/SkPathRef.h
index 49cc28f..92568d8 100644
--- a/include/private/SkPathRef.h
+++ b/include/private/SkPathRef.h
@@ -15,7 +15,6 @@
 #include "SkRRect.h"
 #include "SkRect.h"
 #include "SkRefCnt.h"
-#include "SkTArray.h"
 #include "SkTDArray.h"
 #include "SkTemplates.h"
 #include "SkTo.h"
@@ -310,24 +309,9 @@
      */
     uint32_t genID() const;
 
-    class GenIDChangeListener : public SkRefCnt {
-    public:
-        GenIDChangeListener() : fShouldUnregisterFromPath(false) {}
+    struct GenIDChangeListener : SkRefCnt {
         virtual ~GenIDChangeListener() {}
-
         virtual void onChange() = 0;
-
-        // The caller can use this method to notify the path that it no longer needs to listen. Once
-        // called, the path will remove this listener from the list at some future point.
-        void markShouldUnregisterFromPath() {
-            fShouldUnregisterFromPath.store(true, std::memory_order_relaxed);
-        }
-        bool shouldUnregisterFromPath() {
-            return fShouldUnregisterFromPath.load(std::memory_order_relaxed);
-        }
-
-    private:
-        mutable std::atomic<bool> fShouldUnregisterFromPath;
     };
 
     void addGenIDChangeListener(sk_sp<GenIDChangeListener>);  // Threadsafe.
@@ -561,8 +545,8 @@
     mutable uint32_t    fGenerationID;
     SkDEBUGCODE(int32_t fEditorsAttached;) // assert that only one editor in use at any time.
 
-    SkMutex fGenIDChangeListenersMutex;
-    SkTArray<sk_sp<GenIDChangeListener>> fGenIDChangeListeners;
+    SkMutex                         fGenIDChangeListenersMutex;
+    SkTDArray<GenIDChangeListener*> fGenIDChangeListeners;  // pointers are reffed
 
     mutable uint8_t  fBoundsIsDirty;
     mutable bool     fIsFinite;    // only meaningful if bounds are valid