Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Unified Diff: tools/flags/SkCommonFlagsConfig.h

Issue 2337163002: Add ContextOptions field to SkCommandLineConfigGpu (Closed)
Patch Set: Add ContextOptions field to SkCommandLineConfigGpu Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/GrContextFactoryTest.cpp ('k') | tools/flags/SkCommonFlagsConfig.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/flags/SkCommonFlagsConfig.h
diff --git a/tools/flags/SkCommonFlagsConfig.h b/tools/flags/SkCommonFlagsConfig.h
index 641c68b3eeafe15d4c97ab8f696f58fccd685d22..e817339c6e1b756ac2b731a022384884b12b4503 100644
--- a/tools/flags/SkCommonFlagsConfig.h
+++ b/tools/flags/SkCommonFlagsConfig.h
@@ -51,13 +51,15 @@ class SkCommandLineConfig {
class SkCommandLineConfigGpu : public SkCommandLineConfig {
public:
typedef sk_gpu_test::GrContextFactory::ContextType ContextType;
+ typedef sk_gpu_test::GrContextFactory::ContextOptions ContextOptions;
SkCommandLineConfigGpu(const SkString& tag, const SkTArray<SkString>& viaParts,
ContextType contextType, bool useNVPR, bool useInstanced, bool useDIText,
int samples, SkColorType colorType, sk_sp<SkColorSpace> colorSpace);
const SkCommandLineConfigGpu* asConfigGpu() const override { return this; }
ContextType getContextType() const { return fContextType; }
- bool getUseNVPR() const { return fUseNVPR; }
- bool getUseInstanced() const { return fUseInstanced; }
+ ContextOptions getContextOptions() const { return fContextOptions; }
+ bool getUseNVPR() const { return fContextOptions & ContextOptions::kEnableNVPR; }
+ bool getUseInstanced() const { return fContextOptions & ContextOptions::kUseInstanced; }
bool getUseDIText() const { return fUseDIText; }
int getSamples() const { return fSamples; }
SkColorType getColorType() const { return fColorType; }
@@ -65,8 +67,7 @@ class SkCommandLineConfigGpu : public SkCommandLineConfig {
private:
ContextType fContextType;
- bool fUseNVPR;
- bool fUseInstanced;
+ ContextOptions fContextOptions;
bool fUseDIText;
int fSamples;
SkColorType fColorType;
« no previous file with comments | « tests/GrContextFactoryTest.cpp ('k') | tools/flags/SkCommonFlagsConfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698