14 "Create this many extra threads to assist with GPU work, "
15 "including software path rendering. Defaults to two.");
20 "Allows path mask textures to be cached in GPU configs.");
22 "Causes all flush-time callbacks to fail.");
24 "Causes all GPU paths to be processed as if 'setIsVolatile' had been called.");
27 "Set of enabled gpu path renderers. Defined as a list of: "
28 "[~]none [~]dashline [~]aahairline [~]aaconvex [~]aalinearizing [~]small [~]tri "
29 "[~]atlas [~]tess [~]all");
32 "Number of samples for internal draws that use MSAA, or default value if negative.");
35 "Maximum width and height of internal texture atlases, or default value if negative.");
38 "Disables all GPU driver correctness workarounds");
41 "Don't reorder tasks to reduce render passes");
44 "Maximum number of bytes to use for budgeted GPU resources. "
45 "Default is -1, which means GrResourceCache::kDefaultMaxSize.");
48 "Allows MSAA to be enabled on newer intel GPUs.");
51 if (!strcmp(
name,
"none")) {
53 }
else if (!strcmp(
name,
"dashline")) {
55 }
else if (!strcmp(
name,
"aahairline")) {
57 }
else if (!strcmp(
name,
"aaconvex")) {
59 }
else if (!strcmp(
name,
"aalinearizing")) {
61 }
else if (!strcmp(
name,
"small")) {
63 }
else if (!strcmp(
name,
"tri")) {
65 }
else if (!strcmp(
name,
"atlas")) {
67 }
else if (!strcmp(
name,
"tess")) {
69 }
else if (!strcmp(
name,
"default")) {
72 SK_ABORT(
"error: unknown named path renderer \"%s\"\n",
name);
76 if (FLAGS_pr.isEmpty()) {
84 for (
int i = 0;
i < FLAGS_pr.size(); ++
i) {
85 const char*
name = FLAGS_pr[
i];
87 gpuPathRenderers &= ~get_named_pathrenderers_flags(&
name[1]);
92 return gpuPathRenderers;
96 static std::unique_ptr<SkExecutor> gGpuExecutor = (0 != FLAGS_gpuThreads)
100 ctxOptions->
fExecutor = gGpuExecutor.get();
102 ctxOptions->fFailFlushTimeCallbacks = FLAGS_failFlushTimeCallbacks;
103 ctxOptions->fAllPathsVolatile = FLAGS_allPathsVolatile;
106 ctxOptions->fResourceCacheLimitOverride = FLAGS_gpuResourceCacheLimit;
108 if (FLAGS_internalSamples >= 0) {
111 if (FLAGS_maxAtlasSize >= 0) {
112 ctxOptions->fMaxTextureAtlasSize = FLAGS_maxAtlasSize;
115 if (FLAGS_dontReduceOpsTaskSplitting) {
DEFINE_int(gpuThreads, 2, "Create this many extra threads to assist with GPU work, " "including software path rendering. Defaults to two.")
#define SK_ABORT(message,...)
static std::unique_ptr< SkExecutor > MakeFIFOThreadPool(int threads=0, bool allowBorrowing=true)
void SetCtxOptions(struct GrContextOptions *)
static DEFINE_string(pr, "", "Set of enabled gpu path renderers. Defined as a list of: " "[~]none [~]dashline [~]aahairline [~]aaconvex [~]aalinearizing [~]small [~]tri " "[~]atlas [~]tess [~]all")
static GpuPathRenderers get_named_pathrenderers_flags(const char *name)
static DEFINE_bool(cachePathMasks, true, "Allows path mask textures to be cached in GPU configs.")
static GpuPathRenderers collect_gpu_path_renderers_from_flags()
static DEFINE_int(internalSamples, -1, "Number of samples for internal draws that use MSAA, or default value if negative.")
DEF_SWITCHES_START aot vmservice shared library name
int fInternalMultisampleCount
Enable fReduceOpsTaskSplitting
bool fAllowMSAAOnNewIntel
bool fDisableDriverCorrectnessWorkarounds
bool fAllowPathMaskCaching