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/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp
index 289a35d..b0a9136 100644
--- a/src/gpu/GrResourceProvider.cpp
+++ b/src/gpu/GrResourceProvider.cpp
@@ -225,12 +225,13 @@
}
sk_sp<GrTexture> GrResourceProvider::wrapBackendTexture(const GrBackendTexture& tex,
- GrWrapOwnership ownership) {
+ GrWrapOwnership ownership,
+ bool purgeImmediately) {
ASSERT_SINGLE_OWNER
if (this->isAbandoned()) {
return nullptr;
}
- return fGpu->wrapBackendTexture(tex, ownership);
+ return fGpu->wrapBackendTexture(tex, ownership, purgeImmediately);
}
sk_sp<GrTexture> GrResourceProvider::wrapRenderableBackendTexture(const GrBackendTexture& tex,