aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/GrOpList.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/private/GrOpList.h')
-rw-r--r--include/private/GrOpList.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/private/GrOpList.h b/include/private/GrOpList.h
index 846a5834f7..0d5a1a245a 100644
--- a/include/private/GrOpList.h
+++ b/include/private/GrOpList.h
@@ -17,6 +17,7 @@
class GrAuditTrail;
class GrCaps;
class GrOpFlushState;
+class GrOpMemoryPool;
class GrRenderTargetOpList;
class GrResourceAllocator;
class GrResourceProvider;
@@ -28,7 +29,7 @@ struct SkIRect;
class GrOpList : public SkRefCnt {
public:
- GrOpList(GrResourceProvider*, GrSurfaceProxy*, GrAuditTrail*);
+ GrOpList(GrResourceProvider*, sk_sp<GrOpMemoryPool>, GrSurfaceProxy*, GrAuditTrail*);
~GrOpList() override;
// These four methods are invoked at flush time
@@ -102,12 +103,16 @@ public:
protected:
bool isInstantiated() const;
- GrSurfaceProxyRef fTarget;
- GrAuditTrail* fAuditTrail;
+ // This is a backpointer to the GrOpMemoryPool that holds the memory for this opLists' ops.
+ // In the DDL case, these back pointers keep the DDL's GrOpMemoryPool alive as long as its
+ // constituent opLists survive.
+ sk_sp<GrOpMemoryPool> fOpMemoryPool;
+ GrSurfaceProxyRef fTarget;
+ GrAuditTrail* fAuditTrail;
- GrLoadOp fColorLoadOp = GrLoadOp::kLoad;
- GrColor fLoadClearColor = 0x0;
- GrLoadOp fStencilLoadOp = GrLoadOp::kLoad;
+ GrLoadOp fColorLoadOp = GrLoadOp::kLoad;
+ GrColor fLoadClearColor = 0x0;
+ GrLoadOp fStencilLoadOp = GrLoadOp::kLoad;
// List of texture proxies whose contents are being prepared on a worker thread
SkTArray<GrTextureProxy*, true> fDeferredProxies;