Index: src/gpu/GrOptDrawState.cpp |
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp |
index c8218d7a9020a617d2cc4ffae75dc497d885916f..cea5caa7abd747890a43a9b435b62eccc367f5f0 100644 |
--- a/src/gpu/GrOptDrawState.cpp |
+++ b/src/gpu/GrOptDrawState.cpp |
@@ -54,7 +54,7 @@ GrOptDrawState::GrOptDrawState(const GrDrawState& drawState, |
// Copy GeometryProcesssor from DS or ODS |
if (drawState.hasGeometryProcessor()) { |
- fGeometryProcessor.reset(SkNEW_ARGS(GrGeometryStage, (*drawState.getGeometryProcessor()))); |
+ fGeometryProcessor.initAndRef(drawState.fGeometryProcessor); |
} else { |
fGeometryProcessor.reset(NULL); |
} |
@@ -308,8 +308,8 @@ void GrOptDrawState::getStageStats(const GrDrawState& ds, int firstColorStageIdx |
get_stage_stats(stage, &fReadsDst, &fReadsFragPosition); |
} |
if (ds.hasGeometryProcessor()) { |
- const GrGeometryStage& stage = *ds.getGeometryProcessor(); |
- fReadsFragPosition = fReadsFragPosition || stage.getProcessor()->willReadFragmentPosition(); |
+ const GrGeometryProcessor& gp = *ds.getGeometryProcessor(); |
+ fReadsFragPosition = fReadsFragPosition || gp.willReadFragmentPosition(); |
} |
} |
@@ -357,9 +357,7 @@ bool GrOptDrawState::isEqual(const GrOptDrawState& that) const { |
if (this->hasGeometryProcessor()) { |
if (!that.hasGeometryProcessor()) { |
return false; |
- } else if (!GrProcessorStage::AreCompatible(*this->getGeometryProcessor(), |
- *that.getGeometryProcessor(), |
- explicitLocalCoords)) { |
+ } else if (!this->getGeometryProcessor()->isEqual(*that.getGeometryProcessor())) { |
return false; |
} |
} else if (that.hasGeometryProcessor()) { |
@@ -367,13 +365,13 @@ bool GrOptDrawState::isEqual(const GrOptDrawState& that) const { |
} |
for (int i = 0; i < this->numColorStages(); i++) { |
- if (!GrProcessorStage::AreCompatible(this->getColorStage(i), that.getColorStage(i), |
+ if (!GrFragmentStage::AreCompatible(this->getColorStage(i), that.getColorStage(i), |
explicitLocalCoords)) { |
return false; |
} |
} |
for (int i = 0; i < this->numCoverageStages(); i++) { |
- if (!GrProcessorStage::AreCompatible(this->getCoverageStage(i), that.getCoverageStage(i), |
+ if (!GrFragmentStage::AreCompatible(this->getCoverageStage(i), that.getCoverageStage(i), |
explicitLocalCoords)) { |
return false; |
} |