diff options
Diffstat (limited to 'tools/flags/SkCommonFlagsConfig.h')
-rw-r--r-- | tools/flags/SkCommonFlagsConfig.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/flags/SkCommonFlagsConfig.h b/tools/flags/SkCommonFlagsConfig.h index 2b80397a2a..7336fa7971 100644 --- a/tools/flags/SkCommonFlagsConfig.h +++ b/tools/flags/SkCommonFlagsConfig.h @@ -51,15 +51,19 @@ class SkCommandLineConfig { class SkCommandLineConfigGpu : public SkCommandLineConfig { public: typedef sk_gpu_test::GrContextFactory::ContextType ContextType; - typedef sk_gpu_test::GrContextFactory::ContextOptions ContextOptions; + typedef sk_gpu_test::GrContextFactory::ContextOverrides ContextOverrides; 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; } - ContextOptions getContextOptions() const { return fContextOptions; } - bool getUseNVPR() const { return fContextOptions & ContextOptions::kEnableNVPR; } - bool getUseInstanced() const { return fContextOptions & ContextOptions::kUseInstanced; } + ContextOverrides getContextOverrides() const { return fContextOverrides; } + bool getUseNVPR() const { + SkASSERT(!(fContextOverrides & ContextOverrides::kRequireNVPRSupport) || + !(fContextOverrides & ContextOverrides::kDisableNVPR)); + return fContextOverrides & ContextOverrides::kRequireNVPRSupport; + } + bool getUseInstanced() const { return fContextOverrides & ContextOverrides::kUseInstanced; } bool getUseDIText() const { return fUseDIText; } int getSamples() const { return fSamples; } SkColorType getColorType() const { return fColorType; } @@ -67,7 +71,7 @@ class SkCommandLineConfigGpu : public SkCommandLineConfig { private: ContextType fContextType; - ContextOptions fContextOptions; + ContextOverrides fContextOverrides; bool fUseDIText; int fSamples; SkColorType fColorType; |