Correctly delete ops in GrOpsTask::reset
This resetting occurs when merging ops tasks, when we decide to skip
an ops task because a later ops task in the list has a clear color.
You can't just delete the op chains, you have to get all the stuff
out of the chains first or else you'll hit an assert.
Bug: skia:10877
Change-Id: I5377f242a67ab65a656783a61a534be4756f6c21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389959
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
diff --git a/src/gpu/GrOpsTask.cpp b/src/gpu/GrOpsTask.cpp
index 895fecc..1c2a9c9 100644
--- a/src/gpu/GrOpsTask.cpp
+++ b/src/gpu/GrOpsTask.cpp
@@ -679,7 +679,7 @@
fClipAllocators.reset();
fClippedContentBounds = SkIRect::MakeEmpty();
fTotalBounds = SkRect::MakeEmpty();
- fOpChains.reset();
+ this->deleteOps();
fRenderPassXferBarriers = GrXferBarrierFlags::kNone;
}