From d28a79d49549568c3ebac36288ea3965496333f8 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Mon, 16 Oct 2017 13:01:07 -0400 Subject: Make GrResourceProvider more sk_spified Change-Id: If191553093031705756358f4551a5b1e96439742 Reviewed-on: https://skia-review.googlesource.com/60000 Commit-Queue: Brian Salomon Reviewed-by: Robert Phillips --- src/gpu/ops/GrStencilAndCoverPathRenderer.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/gpu/ops/GrStencilAndCoverPathRenderer.cpp') diff --git a/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp b/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp index 3179ebacc8..20c02c8f97 100644 --- a/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp +++ b/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp @@ -49,14 +49,13 @@ GrStencilAndCoverPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const return CanDrawPath::kYes; } -static GrPath* get_gr_path(GrResourceProvider* resourceProvider, const GrShape& shape) { +static sk_sp get_gr_path(GrResourceProvider* resourceProvider, const GrShape& shape) { GrUniqueKey key; bool isVolatile; GrPath::ComputeKey(shape, &key, &isVolatile); sk_sp path; if (!isVolatile) { - path.reset( - static_cast(resourceProvider->findAndRefResourceByUniqueKey(key))); + path = resourceProvider->findByUniqueKey(key); } if (!path) { SkPath skPath; @@ -72,7 +71,7 @@ static GrPath* get_gr_path(GrResourceProvider* resourceProvider, const GrShape& SkASSERT(path->isEqualTo(skPath, shape.style())); #endif } - return path.release(); + return path; } void GrStencilAndCoverPathRenderer::onStencilPath(const StencilPathArgs& args) { -- cgit v1.2.3