aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/private/GrTypesPriv.h11
-rw-r--r--src/gpu/GrPathRendererChain.cpp7
-rw-r--r--tools/flags/SkCommonFlags.cpp6
-rw-r--r--tools/flags/SkCommonFlagsGpu.h22
4 files changed, 23 insertions, 23 deletions
diff --git a/include/private/GrTypesPriv.h b/include/private/GrTypesPriv.h
index 4061f289e9..ee6bfd8097 100644
--- a/include/private/GrTypesPriv.h
+++ b/include/private/GrTypesPriv.h
@@ -972,12 +972,11 @@ enum class GpuPathRenderers {
kNone = 0, // Always use sofware masks and/or GrDefaultPathRenderer.
kDashLine = 1 << 0,
kStencilAndCover = 1 << 1,
- kCoverageCounting = 1 << 2,
- kAAHairline = 1 << 3,
- kAAConvex = 1 << 4,
- kAALinearizing = 1 << 5,
- kSmall = 1 << 6,
- kTessellating = 1 << 7,
+ kAAConvex = 1 << 2,
+ kAALinearizing = 1 << 3,
+ kSmall = 1 << 4,
+ kCoverageCounting = 1 << 5,
+ kTessellating = 1 << 6,
kAll = (kTessellating | (kTessellating - 1)),
kDefault = kAll
diff --git a/src/gpu/GrPathRendererChain.cpp b/src/gpu/GrPathRendererChain.cpp
index 60c935ab08..6301045cb7 100644
--- a/src/gpu/GrPathRendererChain.cpp
+++ b/src/gpu/GrPathRendererChain.cpp
@@ -34,6 +34,10 @@ 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(
@@ -43,9 +47,6 @@ 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/tools/flags/SkCommonFlags.cpp b/tools/flags/SkCommonFlags.cpp
index a2c2375e10..ed4d169585 100644
--- a/tools/flags/SkCommonFlags.cpp
+++ b/tools/flags/SkCommonFlags.cpp
@@ -161,10 +161,10 @@ DEFINE_bool(cachePathMasks, true, "Allows path mask textures to be cached in GPU
DEFINE_bool(noGS, false, "Disables support for geometry shaders.");
-DEFINE_string(pr, "all",
+DEFINE_string(pr, "default",
"Set of enabled gpu path renderers. Defined as a list of: "
- "[~]none [~]dashline [~]nvpr [~]ccpr [~]aahairline [~]aaconvex [~]aalinearizing "
- "[~]small [~]tess] [~]all");
+ "[~]all [~]default [~]dashline [~]nvpr [~]aaconvex "
+ "[~]aalinearizing [~]small [~]tess]");
void SetCtxOptionsFromCommonFlags(GrContextOptions* ctxOptions) {
static std::unique_ptr<SkExecutor> gGpuExecutor = (0 != FLAGS_gpuThreads)
diff --git a/tools/flags/SkCommonFlagsGpu.h b/tools/flags/SkCommonFlagsGpu.h
index cb8a439ccc..23800ec911 100644
--- a/tools/flags/SkCommonFlagsGpu.h
+++ b/tools/flags/SkCommonFlagsGpu.h
@@ -18,26 +18,26 @@ DECLARE_bool(noGS);
DECLARE_string(pr);
inline GpuPathRenderers get_named_pathrenderers_flags(const char* name) {
- if (!strcmp(name, "none")) {
- return GpuPathRenderers::kNone;
+ if (!strcmp(name, "all")) {
+ return GpuPathRenderers::kAll;
+ } else if (!strcmp(name, "default")) {
+ return GpuPathRenderers::kDefault;
} else if (!strcmp(name, "dashline")) {
return GpuPathRenderers::kDashLine;
} else if (!strcmp(name, "nvpr")) {
return GpuPathRenderers::kStencilAndCover;
- } else if (!strcmp(name, "ccpr")) {
- return GpuPathRenderers::kCoverageCounting;
- } else if (!strcmp(name, "aahairline")) {
- return GpuPathRenderers::kAAHairline;
} else if (!strcmp(name, "aaconvex")) {
return GpuPathRenderers::kAAConvex;
} else if (!strcmp(name, "aalinearizing")) {
return GpuPathRenderers::kAALinearizing;
} else if (!strcmp(name, "small")) {
return GpuPathRenderers::kSmall;
+ } else if (!strcmp(name, "ccpr")) {
+ return GpuPathRenderers::kCoverageCounting;
} else if (!strcmp(name, "tess")) {
return GpuPathRenderers::kTessellating;
- } else if (!strcmp(name, "all")) {
- return GpuPathRenderers::kAll;
+ } else if (!strcmp(name, "none")) {
+ return GpuPathRenderers::kNone;
}
SK_ABORT(SkStringPrintf("error: unknown named path renderer \"%s\"\n", name).c_str());
return GpuPathRenderers::kNone;
@@ -45,10 +45,10 @@ inline GpuPathRenderers get_named_pathrenderers_flags(const char* name) {
inline GpuPathRenderers CollectGpuPathRenderersFromFlags() {
if (FLAGS_pr.isEmpty()) {
- return GpuPathRenderers::kAll;
+ return GpuPathRenderers::kDefault;
}
- GpuPathRenderers gpuPathRenderers = '~' == FLAGS_pr[0][0]
- ? GpuPathRenderers::kAll : GpuPathRenderers::kNone;
+ GpuPathRenderers gpuPathRenderers = '~' == FLAGS_pr[0][0] ?
+ GpuPathRenderers::kDefault : GpuPathRenderers::kNone;
for (int i = 0; i < FLAGS_pr.count(); ++i) {
const char* name = FLAGS_pr[i];
if (name[0] == '~') {