diff options
author | Robert Phillips <robertphillips@google.com> | 2018-06-14 14:31:17 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-15 11:33:14 +0000 |
commit | c8cee446bf9c07da8848bbd032abf26e79966ac1 (patch) | |
tree | 5f024f9dfb1aca470915da9fae96eac0710f5884 /src/gpu/GrRenderTargetOpList.h | |
parent | 9e6402677f1c8f2c3bdc3b812ee38ea2931d92b3 (diff) |
Move op memory storage to GrContext
TBR=bsalomon@google.com
Change-Id: Ifa95bf0073b9d948f2c937d10088b7734b971f90
Reviewed-on: https://skia-review.googlesource.com/131500
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
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) { |