8f4e560871
This consolidates tools/flags/CommonFlagsFontMgr.h into tools/flags/CommonFlags.h and adds all those common flags into the CommonFlags namespace. I also cleaned up a few unused includes in DM.cpp Change-Id: I1d1bf6598dfb87619b6abbb9faa1e24631f76fb4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459476 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
55 lines
1.5 KiB
C++
55 lines
1.5 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"
|
|
|
|
namespace CommonFlags {
|
|
/**
|
|
* 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
|
|
* --allPathsVolatile
|
|
* --(no)gs
|
|
* --(no)ts
|
|
* --maxTessellationSegments
|
|
* --pr
|
|
* --internalSamples
|
|
* --disableDriverCorrectnessWorkarounds
|
|
* --reduceOpsTaskSplitting
|
|
* --dontReduceOpsTaskSplitting
|
|
*/
|
|
void SetCtxOptions(struct GrContextOptions*);
|
|
|
|
/**
|
|
* Enable, disable, or force analytic anti-aliasing using --analyticAA and --forceAnalyticAA.
|
|
*/
|
|
void SetAnalyticAA();
|
|
|
|
/**
|
|
* Turn on portable (--nonativeFonts) or GDI font rendering (--gdi).
|
|
*/
|
|
void SetDefaultFontMgr();
|
|
|
|
} // namespace CommonFlags
|