commit | 39811680dc22a00c741e03eae791a623e5e8aace | [log] [tgz] |
---|---|---|
author | Chris Dalton <csmartdalton@google.com> | Thu Mar 11 22:45:48 2021 -0700 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Fri Mar 12 16:05:51 2021 +0000 |
tree | 3860652293e4e29d54cf918e64817b5b5f434b29 | |
parent | 03730e6ca6ad1db6e328535f950edae0eaa38e7e [diff] [blame] |
Reset onFlush render tasks when allocation failed Change-Id: I527be48790585b91a7b2b223a61de4b5ac30e3c6 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384096 Reviewed-by: Adlai Holler <adlai@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp index 3bc1b7d..9077e2c 100644 --- a/src/gpu/GrDrawingManager.cpp +++ b/src/gpu/GrDrawingManager.cpp
@@ -347,6 +347,10 @@ } fDAG.reset(); fLastRenderTasks.reset(); + for (const sk_sp<GrRenderTask>& onFlushRenderTask : fOnFlushRenderTasks) { + onFlushRenderTask->disown(this); + } + fOnFlushRenderTasks.reset(); } void GrDrawingManager::sortTasks() {