aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawingManager.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-01-29 10:34:25 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-29 16:01:21 +0000
commitaa3dfbe51e6f14db5ccc048b4167ad334ce05176 (patch)
tree29ecae5f1461148747751d7c51e00e3cc470db9b /src/gpu/GrDrawingManager.cpp
parent03bd9ee472ed1f7b3b2320277fdf32e461abc54d (diff)
Remove Ops whose lazy proxies fail to instantiate on flush
Bug: skia: Change-Id: If8b5b9e5d0c306be28ba192b731d34d185427354 Reviewed-on: https://skia-review.googlesource.com/99440 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrDrawingManager.cpp')
-rw-r--r--src/gpu/GrDrawingManager.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 302da06c07..616ac581e4 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -183,9 +183,17 @@ GrSemaphoresSubmitted GrDrawingManager::internalFlush(GrSurfaceProxy*,
startIndex = 0;
stopIndex = fOpLists.count();
#else
- while (alloc.assign(&startIndex, &stopIndex))
+ GrResourceAllocator::AssignError error = GrResourceAllocator::AssignError::kNoError;
+ while (alloc.assign(&startIndex, &stopIndex, &error))
#endif
{
+#ifndef SK_DISABLE_EXPLICIT_GPU_RESOURCE_ALLOCATION
+ if (GrResourceAllocator::AssignError::kFailedProxyInstantiation == error) {
+ for (int i = startIndex; i < stopIndex; ++i) {
+ fOpLists[i]->purgeOpsWithUninstantiatedProxies();
+ }
+ }
+#endif
if (this->executeOpLists(startIndex, stopIndex, &flushState)) {
flushed = true;
}