aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2018-07-26 12:34:49 -0600
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-27 13:30:17 +0000
commit9acfc6cac2c68ab48121b321ad4e2d14f03224c7 (patch)
treed741076005affbcc58dba8e5d8897c96810f50b9 /src
parent55b1e61684548465123e77535c2031c98b4fd66d (diff)
Add kAAHairline to GpuPathRenderers
With the upcoming ccpr stroking, this will no longer be the only path renderer that can handle hairlines. Bug: skia: Change-Id: I45b30ccd578bee1388a3a07a234af76a19768de6 Reviewed-on: https://skia-review.googlesource.com/142272 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrPathRendererChain.cpp7
-rw-r--r--src/gpu/GrPathRendererChain.h2
2 files changed, 4 insertions, 5 deletions
diff --git a/src/gpu/GrPathRendererChain.cpp b/src/gpu/GrPathRendererChain.cpp
index 6301045cb7..60c935ab08 100644
--- a/src/gpu/GrPathRendererChain.cpp
+++ b/src/gpu/GrPathRendererChain.cpp
@@ -34,10 +34,6 @@ GrPathRendererChain::GrPathRendererChain(GrContext* context, const Options& opti
fChain.push_back(std::move(pr));
}
}
-
- // AA hairline path renderer is very specialized - no other renderer can do this job well
- fChain.push_back(sk_make_sp<GrAAHairLinePathRenderer>());
-
if (options.fGpuPathRenderers & GpuPathRenderers::kCoverageCounting) {
using AllowCaching = GrCoverageCountingPathRenderer::AllowCaching;
if (auto ccpr = GrCoverageCountingPathRenderer::CreateIfSupported(
@@ -47,6 +43,9 @@ GrPathRendererChain::GrPathRendererChain(GrContext* context, const Options& opti
fChain.push_back(std::move(ccpr));
}
}
+ if (options.fGpuPathRenderers & GpuPathRenderers::kAAHairline) {
+ fChain.push_back(sk_make_sp<GrAAHairLinePathRenderer>());
+ }
if (options.fGpuPathRenderers & GpuPathRenderers::kAAConvex) {
fChain.push_back(sk_make_sp<GrAAConvexPathRenderer>());
}
diff --git a/src/gpu/GrPathRendererChain.h b/src/gpu/GrPathRendererChain.h
index 14200cecce..e36845034d 100644
--- a/src/gpu/GrPathRendererChain.h
+++ b/src/gpu/GrPathRendererChain.h
@@ -28,7 +28,7 @@ class GrPathRendererChain : public SkNoncopyable {
public:
struct Options {
bool fAllowPathMaskCaching = false;
- GpuPathRenderers fGpuPathRenderers = GpuPathRenderers::kDefault;
+ GpuPathRenderers fGpuPathRenderers = GpuPathRenderers::kAll;
};
GrPathRendererChain(GrContext* context, const Options&);