skia2/tools/flags/CommonFlags.h
Chris Dalton ed6e82796b Add a flag for suppressing tessellation shaders
Change-Id: Ic29618c5eac9b3eed92ce0321162745645240d6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285142
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-23 18:35:48 +00:00

45 lines
1.3 KiB
C

/*
* Copyright 2014 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#pragma once
#include "include/core/SkString.h"
#include "include/private/SkTArray.h"
#include "tools/flags/CommandLineFlags.h"
/**
* Helper to assist in collecting image paths from |dir| specified through a command line
* flag.
*
* Populates |output|, an array of strings with paths to images to test.
*
* Returns true if each argument to the images flag is meaningful:
* - If the file/directory does not exist, return false.
* - If |dir| does not have any supported images (based on file type), return false.
* - If |dir| is a single file, assume the user is deliberately testing this image,
* regardless of file type.
*/
bool CollectImages(CommandLineFlags::StringArray dir, SkTArray<SkString>* output);
/**
* Helper to set GrContextOptions from common GPU flags, including
* --gpuThreads
* --cachePathMasks
* --(no)gs
* --(no)ts
* --pr
* --internalSamples
* --disableDriverCorrectnessWorkarounds
* --reduceOpsTaskSplitting
* --dontReduceOpsTaskSplitting
*/
void SetCtxOptionsFromCommonFlags(struct GrContextOptions*);
/**
* Enable, disable, or force analytic anti-aliasing using --analyticAA and --forceAnalyticAA.
*/
void SetAnalyticAAFromCommonFlags();