diff options
author | 2016-12-13 15:10:11 -0500 | |
---|---|---|
committer | 2016-12-13 20:48:50 +0000 | |
commit | 24f19780d1e76595c049d8cad4352de839cfc6b5 (patch) | |
tree | 43caf0b20dddaf2687451ae0f8096bfc639dbda2 /src/gpu/text/GrStencilAndCoverTextContext.cpp | |
parent | d5aabd6744b64e2bfc48b4dec2311ce58e6f9225 (diff) |
Make GrRenderTargetContext::addDrawOp use sk_sp
Change-Id: Iff7f63635cdbc5cc51e5968a565f2fde2be3acb0
Reviewed-on: https://skia-review.googlesource.com/5932
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/text/GrStencilAndCoverTextContext.cpp')
-rw-r--r-- | src/gpu/text/GrStencilAndCoverTextContext.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
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) { |