diff options
Diffstat (limited to 'src/gpu/GrRenderTargetOpList.h')
-rw-r--r-- | src/gpu/GrRenderTargetOpList.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gpu/GrRenderTargetOpList.h b/src/gpu/GrRenderTargetOpList.h index 00b9f5eb27..8629a7cb1f 100644 --- a/src/gpu/GrRenderTargetOpList.h +++ b/src/gpu/GrRenderTargetOpList.h @@ -32,7 +32,8 @@ private: using DstProxy = GrXferProcessor::DstProxy; public: - GrRenderTargetOpList(GrResourceProvider*, GrRenderTargetProxy*, GrAuditTrail*); + GrRenderTargetOpList(GrResourceProvider*, sk_sp<GrOpMemoryPool>, + GrRenderTargetProxy*, GrAuditTrail*); ~GrRenderTargetOpList() override; @@ -122,6 +123,8 @@ public: private: friend class GrRenderTargetContextPriv; // for stencil clip state. TODO: this is invasive + void deleteOps(); + struct RecordedOp { RecordedOp(std::unique_ptr<GrOp> op, GrAppliedClip* appliedClip, const DstProxy* dstProxy) : fOp(std::move(op)), fAppliedClip(appliedClip) { @@ -130,7 +133,12 @@ private: } } - ~RecordedOp() { } + ~RecordedOp() { + // The ops are stored in a GrMemoryPool so had better have been handled separately + SkASSERT(!fOp); + } + + void deleteOp(GrOpMemoryPool* opMemoryPool); void visitProxies(const GrOp::VisitProxyFunc& func) const { if (fOp) { |