diff options
author | 2016-02-11 06:46:52 -0800 | |
---|---|---|
committer | 2016-02-11 06:46:52 -0800 | |
commit | 1b39f439413c52eb5b172834775104a89eb229aa (patch) | |
tree | b60ad0b1a791040ff3986b5f0f8a82b0dd462f16 /src | |
parent | 84451024bfe06d138629dd7c27cf2ec0f9774dbe (diff) |
Pass a GrContext pointer in GrDrawContext constructor
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1691503002
Review URL: https://codereview.chromium.org/1691503002
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrDrawContext.cpp | 4 | ||||
-rw-r--r-- | src/gpu/GrDrawingManager.cpp | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp index ed969f7e82..be6eaf401d 100644 --- a/src/gpu/GrDrawContext.cpp +++ b/src/gpu/GrDrawContext.cpp @@ -50,7 +50,8 @@ private: // 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, @@ -59,6 +60,7 @@ GrDrawContext::GrDrawContext(GrDrawingManager* drawingMgr, , fRenderTarget(rt) , fDrawTarget(SkSafeRef(rt->getLastDrawTarget())) , fTextContext(nullptr) + , fContext(context) , fSurfaceProps(SkSurfacePropsCopyOrDefault(surfaceProps)) , fAuditTrail(auditTrail) #ifdef SK_DEBUG diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp index 5b23b0c694..30bdfe1c3d 100644 --- a/src/gpu/GrDrawingManager.cpp +++ b/src/gpu/GrDrawingManager.cpp @@ -196,5 +196,6 @@ GrDrawContext* GrDrawingManager::drawContext(GrRenderTarget* rt, return nullptr; } - return new GrDrawContext(this, rt, surfaceProps, fContext->getAuditTrail(), fSingleOwner); + return new GrDrawContext(fContext, this, rt, surfaceProps, fContext->getAuditTrail(), + fSingleOwner); } |