c6142d855c
Turns out lots of tools had two copies of many of these flags. Some GN and .cpp file refactoring to make sure when flags are present in a binary, they do something in that binary. I think this finally finishes the flag refrag. Change-Id: I01488e37ab73a5c4361786863ddb137a7f1095b1 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203420 Commit-Queue: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Mike Klein <mtklein@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
42 lines
1.2 KiB
C
42 lines
1.2 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 "../private/SkTArray.h"
|
|
#include "CommandLineFlags.h"
|
|
#include "SkString.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
|
|
* --noGS
|
|
* --pr
|
|
* --disableDriverCorrectnessWorkarounds
|
|
* --reduceOpListSplitting
|
|
*/
|
|
void SetCtxOptionsFromCommonFlags(struct GrContextOptions*);
|
|
|
|
/**
|
|
* Enable, disable, or force analytic anti-aliasing using --analyticAA and --forceAnalyticAA.
|
|
*/
|
|
void SetAnalyticAAFromCommonFlags();
|