Index: src/gpu/GrPipeline.cpp |
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp |
index c35808e033732c479f6930a052f7f1f1b0a1135e..911169e3368f6a2c30203d73a226813357d8c509 100644 |
--- a/src/gpu/GrPipeline.cpp |
+++ b/src/gpu/GrPipeline.cpp |
@@ -7,6 +7,7 @@ |
#include "GrPipeline.h" |
+#include "GrBatch.h" |
#include "GrDrawTargetCaps.h" |
#include "GrGpu.h" |
#include "GrPipelineBuilder.h" |
@@ -14,13 +15,37 @@ |
#include "GrXferProcessor.h" |
GrPipeline::GrPipeline(const GrPipelineBuilder& pipelineBuilder, |
- const GrPrimitiveProcessor* primProc, |
- const GrDrawTargetCaps& caps, |
- const GrScissorState& scissorState, |
- const GrDeviceCoordTexture* dstCopy) { |
+ const GrPrimitiveProcessor* primProc, |
+ const GrDrawTargetCaps& caps, |
+ const GrScissorState& scissorState, |
+ const GrDeviceCoordTexture* dstCopy) { |
const GrProcOptInfo& colorPOI = pipelineBuilder.colorProcInfo(primProc); |
const GrProcOptInfo& coveragePOI = pipelineBuilder.coverageProcInfo(primProc); |
+ this->internalConstructor(pipelineBuilder, colorPOI, coveragePOI, caps, scissorState, dstCopy); |
+} |
+ |
+GrPipeline::GrPipeline(GrBatch* batch, |
+ const GrPipelineBuilder& pipelineBuilder, |
+ const GrDrawTargetCaps& caps, |
+ const GrScissorState& scissorState, |
+ const GrDeviceCoordTexture* dstCopy) { |
+ GrBatchOpt batchOpt; |
+ batchOpt.fCanTweakAlphaForCoverage = pipelineBuilder.canTweakAlphaForCoverage(); |
+ batch->initBatchOpt(batchOpt); |
+ |
+ const GrProcOptInfo& colorPOI = pipelineBuilder.colorProcInfo(batch); |
+ const GrProcOptInfo& coveragePOI = pipelineBuilder.coverageProcInfo(batch); |
+ |
+ this->internalConstructor(pipelineBuilder, colorPOI, coveragePOI, caps, scissorState, dstCopy); |
+} |
+ |
+void GrPipeline::internalConstructor(const GrPipelineBuilder& pipelineBuilder, |
+ const GrProcOptInfo& colorPOI, |
+ const GrProcOptInfo& coveragePOI, |
+ const GrDrawTargetCaps& caps, |
+ const GrScissorState& scissorState, |
+ const GrDeviceCoordTexture* dstCopy) { |
// Create XferProcessor from DS's XPFactory |
SkAutoTUnref<GrXferProcessor> xferProcessor( |
pipelineBuilder.getXPFactory()->createXferProcessor(colorPOI, coveragePOI)); |