diff options
Diffstat (limited to 'src/gpu/text')
-rw-r--r-- | src/gpu/text/GrAtlasTextBlob.cpp | 11 | ||||
-rw-r--r-- | src/gpu/text/GrStencilAndCoverTextContext.cpp | 11 |
2 files changed, 9 insertions, 13 deletions
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp index 1fb4f2cdda..c5fa86f6e8 100644 --- a/src/gpu/text/GrAtlasTextBlob.cpp +++ b/src/gpu/text/GrAtlasTextBlob.cpp @@ -317,15 +317,12 @@ void GrAtlasTextBlob::flushRun(GrRenderTargetContext* rtc, const GrPaint& grPain GrColor color = grPaint.getColor(); - sk_sp<GrDrawOp> batch(this->createBatch(info, glyphCount, run, - subRun, viewMatrix, x, y, color, - skPaint, props, - distanceAdjustTable, - rtc->isGammaCorrect(), - cache)); + sk_sp<GrDrawOp> op(this->createBatch(info, glyphCount, run, subRun, viewMatrix, x, y, color, + skPaint, props, distanceAdjustTable, + rtc->isGammaCorrect(), cache)); GrPipelineBuilder pipelineBuilder(grPaint, GrAAType::kNone); - rtc->addDrawOp(pipelineBuilder, clip, batch.get()); + rtc->addDrawOp(pipelineBuilder, clip, std::move(op)); } } diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp index b573b83f62..50ca192407 100644 --- a/src/gpu/text/GrStencilAndCoverTextContext.cpp +++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp @@ -633,11 +633,10 @@ void GrStencilAndCoverTextContext::TextRun::draw(GrContext* ctx, const SkRect bounds = SkRect::MakeIWH(renderTargetContext->width(), renderTargetContext->height()); - sk_sp<GrDrawOp> batch( - GrDrawPathRangeBatch::Create(viewMatrix, fTextRatio, fTextInverseRatio * x, - fTextInverseRatio * y, grPaint.getColor(), - GrPathRendering::kWinding_FillType, glyphs.get(), - fInstanceData.get(), bounds)); + sk_sp<GrDrawOp> op(GrDrawPathRangeBatch::Create( + viewMatrix, fTextRatio, fTextInverseRatio * x, fTextInverseRatio * y, + grPaint.getColor(), GrPathRendering::kWinding_FillType, glyphs.get(), + fInstanceData.get(), bounds)); // The run's "font" overrides the anti-aliasing of the passed in SkPaint! GrAAType aaType = GrAAType::kNone; @@ -651,7 +650,7 @@ void GrStencilAndCoverTextContext::TextRun::draw(GrContext* ctx, GrPipelineBuilder pipelineBuilder(grPaint, aaType); pipelineBuilder.setUserStencil(&kCoverPass); - renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get()); + renderTargetContext->addDrawOp(pipelineBuilder, clip, std::move(op)); } if (fFallbackTextBlob) { |