diff options
author | Brian Salomon <bsalomon@google.com> | 2017-01-03 09:42:58 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-03 15:22:16 +0000 |
commit | f8334781914363caf537f22f012fcd5c03c60dad (patch) | |
tree | cfa54aa4a80cd7841959300c245d633fbcd382a0 /src/gpu/ops/GrAAConvexPathRenderer.cpp | |
parent | 5f500920e719b215d5e0e36a6679995ed3c9b4ad (diff) |
Remove ref counting from GrOp.
Instead use std::unique_ptr to manage GrOp lifetime.
Change-Id: Ic1dc1e0ffd7254c3994221f498677af5bbf66a71
Reviewed-on: https://skia-review.googlesource.com/6479
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/ops/GrAAConvexPathRenderer.cpp')
-rw-r--r-- | src/gpu/ops/GrAAConvexPathRenderer.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp index 2d25ff5131..38e60c7c1c 100644 --- a/src/gpu/ops/GrAAConvexPathRenderer.cpp +++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp @@ -735,8 +735,9 @@ static sk_sp<GrGeometryProcessor> create_fill_gp(bool tweakAlphaForCoverage, class AAConvexPathOp final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID - static sk_sp<GrDrawOp> Make(GrColor color, const SkMatrix& viewMatrix, const SkPath& path) { - return sk_sp<GrDrawOp>(new AAConvexPathOp(color, viewMatrix, path)); + static std::unique_ptr<GrDrawOp> Make(GrColor color, const SkMatrix& viewMatrix, + const SkPath& path) { + return std::unique_ptr<GrDrawOp>(new AAConvexPathOp(color, viewMatrix, path)); } const char* name() const override { return "AAConvexPathOp"; } @@ -989,7 +990,8 @@ bool GrAAConvexPathRenderer::onDrawPath(const DrawPathArgs& args) { SkPath path; args.fShape->asPath(&path); - sk_sp<GrDrawOp> op = AAConvexPathOp::Make(args.fPaint->getColor(), *args.fViewMatrix, path); + std::unique_ptr<GrDrawOp> op = + AAConvexPathOp::Make(args.fPaint->getColor(), *args.fViewMatrix, path); GrPipelineBuilder pipelineBuilder(*args.fPaint, args.fAAType); pipelineBuilder.setUserStencil(args.fUserStencilSettings); |