ccpr: Actually register path cache entries as listeners on paths
Bug: skia:8452
Change-Id: If2e19ea43e82893e57d788a75844100f8b6a11d1
Reviewed-on: https://skia-review.googlesource.com/c/160835
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/ccpr/GrCCPathCache.cpp b/src/gpu/ccpr/GrCCPathCache.cpp
index 20f4728..367caff 100644
--- a/src/gpu/ccpr/GrCCPathCache.cpp
+++ b/src/gpu/ccpr/GrCCPathCache.cpp
@@ -174,6 +174,7 @@
this->evict(fLRU.tail()); // We've exceeded our limit.
}
entry = fHashTable.set(HashNode(this, m, shape))->entry();
+ shape.addGenIDChangeListener(sk_ref_sp(entry));
SkASSERT(fHashTable.count() <= kMaxCacheCount);
} else {
fLRU.remove(entry); // Will be re-added at head.