Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: src/gpu/GrPipeline.cpp

Issue 1988923002: Remove GrRenderTarget from GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrPipeline.h ('k') | src/gpu/GrPipelineBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/gpu/GrPipeline.h ('k') | src/gpu/GrPipelineBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698