diff options
author | Brian Salomon <bsalomon@google.com> | 2017-10-16 13:01:07 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-16 17:21:31 +0000 |
commit | d28a79d49549568c3ebac36288ea3965496333f8 (patch) | |
tree | ea8c7f5337d596b92421c44070574b4cb0af3cc2 /src/gpu/ops/GrStencilAndCoverPathRenderer.cpp | |
parent | 1bd76c468c2285b6484f58659641405bd4c3710a (diff) |
Make GrResourceProvider more sk_spified
Change-Id: If191553093031705756358f4551a5b1e96439742
Reviewed-on: https://skia-review.googlesource.com/60000
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/ops/GrStencilAndCoverPathRenderer.cpp')
-rw-r--r-- | src/gpu/ops/GrStencilAndCoverPathRenderer.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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<GrPath> get_gr_path(GrResourceProvider* resourceProvider, const GrShape& shape) { GrUniqueKey key; bool isVolatile; GrPath::ComputeKey(shape, &key, &isVolatile); sk_sp<GrPath> path; if (!isVolatile) { - path.reset( - static_cast<GrPath*>(resourceProvider->findAndRefResourceByUniqueKey(key))); + path = resourceProvider->findByUniqueKey<GrPath>(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) { |