Add flag to force purge resources from cache as soon as possible.
Bug: skia:
Change-Id: Ibd636b9e1bf932033c3161c862523f841cb85e79
Reviewed-on: https://skia-review.googlesource.com/c/171005
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrGpuResourceCacheAccess.h b/src/gpu/GrGpuResourceCacheAccess.h
index 3248c7a..8e9a701 100644
--- a/src/gpu/GrGpuResourceCacheAccess.h
+++ b/src/gpu/GrGpuResourceCacheAccess.h
@@ -30,6 +30,11 @@
}
/**
+ * Even if the resource has a unique key should we still try to purge it as soon as possible.
+ */
+ bool shouldPurgeImmediately() const { return fResource->fShouldPurgeImmediately; }
+
+ /**
* Called by the cache to delete the resource under normal circumstances.
*/
void release() {