Add plumbing for the GrThreadSafeUniquelyKeyedProxyViewCache
This CL is also imperfect and incomplete but, although currently unused, it sketches in how the threadSafeProxyCache will be plumbed through the GrContexts and GrResourceCache.
Bug: 1108408
Change-Id: Idb012b6efd49291de69bd88e4b4c531458a3e553
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317360
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 2739138..e6100c8 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -27,6 +27,7 @@
#include "src/gpu/GrSemaphore.h"
#include "src/gpu/GrShaderUtils.h"
#include "src/gpu/GrSoftwarePathRenderer.h"
+#include "src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.h"
#include "src/gpu/GrTracing.h"
#include "src/gpu/SkGr.h"
#include "src/gpu/ccpr/GrCoverageCountingPathRenderer.h"
@@ -73,6 +74,7 @@
}
SkASSERT(this->getTextBlobCache());
+ SkASSERT(this->threadSafeViewCache());
if (fGpu) {
fStrikeCache = std::make_unique<GrStrikeCache>();
@@ -83,6 +85,7 @@
if (fResourceCache) {
fResourceCache->setProxyProvider(this->proxyProvider());
+ fResourceCache->setThreadSafeViewCache(this->threadSafeViewCache());
}
fDidTestPMConversions = false;
@@ -272,7 +275,6 @@
}
////////////////////////////////////////////////////////////////////////////////
-
bool GrContext::wait(int numSemaphores, const GrBackendSemaphore waitSemaphores[],
bool deleteSemaphoresAfterWait) {
if (!fGpu || fGpu->caps()->semaphoreSupport()) {