| Index: src/gpu/effects/GrDashingEffect.cpp
|
| diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp
|
| index 1641d272fcc1f607009f081a23083b5f27989628..b59b2a6e5cecba57c2625c0633eeaad01df22852 100644
|
| --- a/src/gpu/effects/GrDashingEffect.cpp
|
| +++ b/src/gpu/effects/GrDashingEffect.cpp
|
| @@ -335,7 +335,7 @@
|
| devIntervals[0] = lineLength;
|
| }
|
|
|
| - SkAutoTUnref<const GrGeometryProcessor> gp;
|
| + const GrGeometryProcessor* gp;
|
| bool fullDash = devIntervals[1] > 0.f || useAA;
|
| if (fullDash) {
|
| SkPathEffect::DashInfo devInfo;
|
| @@ -347,11 +347,13 @@
|
| bool isRoundCap = SkPaint::kRound_Cap == cap;
|
| GrDashingEffect::DashCap capType = isRoundCap ? GrDashingEffect::kRound_DashCap :
|
| GrDashingEffect::kNonRound_DashCap;
|
| - gp.reset(GrDashingEffect::Create(color, edgeType, devInfo, strokeWidth, capType));
|
| + gp = GrDashingEffect::Create(color, edgeType, devInfo, strokeWidth, capType);
|
| } else {
|
| // Set up the vertex data for the line and start/end dashes
|
| - gp.reset(GrDefaultGeoProcFactory::Create(color, GrDefaultGeoProcFactory::kPosition_GPType));
|
| - }
|
| + gp = GrDefaultGeoProcFactory::Create(color, GrDefaultGeoProcFactory::kPosition_GPType);
|
| + }
|
| +
|
| + drawState->setGeometryProcessor(gp)->unref();
|
|
|
| int totalRectCnt = 0;
|
|
|
| @@ -433,7 +435,7 @@
|
| }
|
|
|
| target->setIndexSourceToBuffer(gpu->getContext()->getQuadIndexBuffer());
|
| - target->drawIndexedInstances(drawState, gp, kTriangles_GrPrimitiveType, totalRectCnt, 4, 6);
|
| + target->drawIndexedInstances(drawState, kTriangles_GrPrimitiveType, totalRectCnt, 4, 6);
|
| target->resetIndexSource();
|
| return true;
|
| }
|
| @@ -487,7 +489,7 @@
|
|
|
| virtual bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE;
|
|
|
| - virtual void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const SK_OVERRIDE;
|
| + virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE;
|
|
|
| GrPrimitiveEdgeType fEdgeType;
|
| const GrAttribute* fInPosition;
|
| @@ -612,8 +614,8 @@
|
|
|
| DashingCircleEffect::~DashingCircleEffect() {}
|
|
|
| -void DashingCircleEffect::onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const {
|
| - out->setUnknownSingleComponent();
|
| +void DashingCircleEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const {
|
| + inout->mulByUnknownAlpha();
|
| }
|
|
|
| void DashingCircleEffect::getGLProcessorKey(const GrBatchTracker& bt,
|
| @@ -717,7 +719,7 @@
|
|
|
| virtual bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE;
|
|
|
| - virtual void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const SK_OVERRIDE;
|
| + virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE;
|
|
|
| GrPrimitiveEdgeType fEdgeType;
|
| const GrAttribute* fInPosition;
|
| @@ -855,8 +857,8 @@
|
|
|
| DashingLineEffect::~DashingLineEffect() {}
|
|
|
| -void DashingLineEffect::onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const {
|
| - out->setUnknownSingleComponent();
|
| +void DashingLineEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const {
|
| + inout->mulByUnknownAlpha();
|
| }
|
|
|
| void DashingLineEffect::getGLProcessorKey(const GrBatchTracker& bt,
|
|
|