Index: src/gpu/GrPipelineBuilder.cpp |
diff --git a/src/gpu/GrPipelineBuilder.cpp b/src/gpu/GrPipelineBuilder.cpp |
index b31d105963ff4373b1d48208dba6a2c9a34de3f0..5ef30e5947db44fdcb53102da98d306e2d144f5e 100644 |
--- a/src/gpu/GrPipelineBuilder.cpp |
+++ b/src/gpu/GrPipelineBuilder.cpp |
@@ -16,7 +16,8 @@ |
#include "effects/GrPorterDuffXferProcessor.h" |
GrPipelineBuilder::GrPipelineBuilder() |
- : fFlags(0x0) |
+ : fProcDataManager(SkNEW(GrProcessorDataManager)) |
+ , fFlags(0x0) |
, fDrawFace(kBoth_DrawFace) |
, fColorProcInfoValid(false) |
, fCoverageProcInfoValid(false) |
@@ -26,6 +27,7 @@ GrPipelineBuilder::GrPipelineBuilder() |
} |
GrPipelineBuilder& GrPipelineBuilder::operator=(const GrPipelineBuilder& that) { |
+ fProcDataManager.reset(SkNEW_ARGS(GrProcessorDataManager, (*that.processorDataManager()))); |
fRenderTarget.reset(SkSafeRef(that.fRenderTarget.get())); |
fFlags = that.fFlags; |
fStencilSettings = that.fStencilSettings; |
@@ -51,6 +53,10 @@ GrPipelineBuilder& GrPipelineBuilder::operator=(const GrPipelineBuilder& that) { |
void GrPipelineBuilder::setFromPaint(const GrPaint& paint, GrRenderTarget* rt, const GrClip& clip) { |
SkASSERT(0 == fBlockEffectRemovalCnt || 0 == this->numFragmentStages()); |
+ // TODO keep this logically const using an AutoReset |
+ fProcDataManager.reset( |
+ const_cast<GrProcessorDataManager*>(SkRef(paint.processorDataManager()))); |
+ |
fColorStages.reset(); |
fCoverageStages.reset(); |