Index: src/gpu/GrPipeline.cpp |
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp |
index d52e811df050ae131ed5b996ca47698c24a1e461..20089a6a4c6ced2199754d4a6ab100e3fd7da694 100644 |
--- a/src/gpu/GrPipeline.cpp |
+++ b/src/gpu/GrPipeline.cpp |
@@ -8,6 +8,7 @@ |
#include "GrPipeline.h" |
#include "GrCaps.h" |
+#include "GrDrawContext.h" |
#include "GrDrawTarget.h" |
#include "GrGpu.h" |
#include "GrPipelineBuilder.h" |
@@ -22,11 +23,12 @@ GrPipeline* GrPipeline::CreateAt(void* memory, const CreateArgs& args, |
const GrPipelineBuilder& builder = *args.fPipelineBuilder; |
GrPipeline* pipeline = new (memory) GrPipeline; |
- pipeline->fRenderTarget.reset(builder.fRenderTarget.get()); |
+ GrRenderTarget* rt = args.fDrawContext->accessRenderTarget(); |
+ pipeline->fRenderTarget.reset(rt); |
SkASSERT(pipeline->fRenderTarget); |
pipeline->fScissorState = *args.fScissor; |
if (builder.hasUserStencilSettings() || args.fHasStencilClip) { |
- const GrRenderTargetPriv& rtPriv = builder.getRenderTarget()->renderTargetPriv(); |
+ const GrRenderTargetPriv& rtPriv = rt->renderTargetPriv(); |
pipeline->fStencilSettings.reset(*builder.getUserStencil(), args.fHasStencilClip, |
rtPriv.numStencilBits()); |
SkASSERT(!pipeline->fStencilSettings.usesWrapOp() || args.fCaps->stencilWrapOpsSupport()); |
@@ -51,7 +53,7 @@ GrPipeline* GrPipeline::CreateAt(void* memory, const CreateArgs& args, |
} |
// Create XferProcessor from DS's XPFactory |
- bool hasMixedSamples = builder.getRenderTarget()->hasMixedSamples() && |
+ bool hasMixedSamples = args.fDrawContext->hasMixedSamples() && |
(builder.isHWAntialias() || !pipeline->fStencilSettings.isDisabled()); |
const GrXPFactory* xpFactory = builder.getXPFactory(); |
SkAutoTUnref<GrXferProcessor> xferProcessor; |