SkDEBUGCODE(void validate() const;)
- GrDrawContext(GrDrawingManager*, GrRenderTarget*, const SkSurfaceProps* surfaceProps,
- GrAuditTrail*, GrSingleOwner*);
+ GrDrawContext(GrContext*, GrDrawingManager*, GrRenderTarget*,
+ const SkSurfaceProps* surfaceProps, GrAuditTrail*, GrSingleOwner*);
void internalDrawPath(GrPipelineBuilder*,
const SkMatrix& viewMatrix,
// it up. For this reason, the drawTarget should only ever be accessed via 'getDrawTarget'.
GrDrawTarget* fDrawTarget;
GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingManager
+ GrContext* fContext;
SkSurfaceProps fSurfaceProps;
GrAuditTrail* fAuditTrail;
// drawTargets to be picked up and added to by drawContexts lower in the call
// stack. When this occurs with a closed drawTarget, a new one will be allocated
// when the drawContext attempts to use it (via getDrawTarget).
-GrDrawContext::GrDrawContext(GrDrawingManager* drawingMgr,
+GrDrawContext::GrDrawContext(GrContext* context,
+ GrDrawingManager* drawingMgr,
GrRenderTarget* rt,
const SkSurfaceProps* surfaceProps,
GrAuditTrail* auditTrail,
, fRenderTarget(rt)
, fDrawTarget(SkSafeRef(rt->getLastDrawTarget()))
, fTextContext(nullptr)
+ , fContext(context)
, fSurfaceProps(SkSurfacePropsCopyOrDefault(surfaceProps))
, fAuditTrail(auditTrail)
#ifdef SK_DEBUG
return nullptr;
}
- return new GrDrawContext(this, rt, surfaceProps, fContext->getAuditTrail(), fSingleOwner);
+ return new GrDrawContext(fContext, this, rt, surfaceProps, fContext->getAuditTrail(),
+ fSingleOwner);
}