aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawingManager.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-03-08 15:27:36 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-08 21:05:21 +0000
commit4684f82ebca85d4c7043e5c1028e34cf5631da32 (patch)
tree6e640d1b212ab614fa19ccd4e43c5adff440dacd /src/gpu/GrDrawingManager.cpp
parent3adc12213b2d1efbe417476517ff3381af17a311 (diff)
Add ability to uninstantiate lazy proxies after every flush.
Bug: skia: Change-Id: Id32540cda54a9c5e3e6cb721776699be3cc8ac1a Reviewed-on: https://skia-review.googlesource.com/113263 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrDrawingManager.cpp')
-rw-r--r--src/gpu/GrDrawingManager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 62db98edd4..63d1175930 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -214,7 +214,8 @@ GrSemaphoresSubmitted GrDrawingManager::internalFlush(GrSurfaceProxy*,
}
GrResourceAllocator::AssignError error = GrResourceAllocator::AssignError::kNoError;
- while (alloc.assign(&startIndex, &stopIndex, &error)) {
+ while (alloc.assign(&startIndex, &stopIndex, flushState.uninstantiateProxyTracker(),
+ &error)) {
if (GrResourceAllocator::AssignError::kFailedProxyInstantiation == error) {
for (int i = startIndex; i < stopIndex; ++i) {
fOpLists[i]->purgeOpsWithUninstantiatedProxies();
@@ -231,6 +232,8 @@ GrSemaphoresSubmitted GrDrawingManager::internalFlush(GrSurfaceProxy*,
GrSemaphoresSubmitted result = gpu->finishFlush(numSemaphores, backendSemaphores);
+ flushState.uninstantiateProxyTracker()->uninstantiateAllProxies();
+
// We always have to notify the cache when it requested a flush so it can reset its state.
if (flushed || type == GrResourceCache::FlushType::kCacheRequested) {
fContext->contextPriv().getResourceCache()->notifyFlushOccurred(type);