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

Unified Diff: tools/gpu/GrContextFactory.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 | « tools/flags/SkCommonFlagsConfig.cpp ('k') | tools/gpu/GrContextFactory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gpu/GrContextFactory.h
diff --git a/tools/gpu/GrContextFactory.h b/tools/gpu/GrContextFactory.h
index f70ebea9adc47c39e5610536ee1fbed38d622573..d5e87a42f41ff6c9bd88035efa2c509c0e376992 100644
--- a/tools/gpu/GrContextFactory.h
+++ b/tools/gpu/GrContextFactory.h
@@ -89,11 +89,11 @@ public:
* Options for GL context creation. For historical and testing reasons the options will default
* to not using GL_NV_path_rendering extension even when the driver supports it.
*/
- enum ContextOptions {
- kNone_ContextOptions = 0x0,
- kEnableNVPR_ContextOptions = 0x1,
- kUseInstanced_ContextOptions = 0x2,
- kRequireSRGBSupport_ContextOptions = 0x4,
+ enum class ContextOptions {
+ kNone = 0x0,
+ kEnableNVPR = 0x1,
+ kUseInstanced = 0x2,
+ kRequireSRGBSupport = 0x4,
};
static ContextType NativeContextTypeForBackend(GrBackend backend) {
@@ -163,11 +163,11 @@ public:
* Get a context initialized with a type of GL context. It also makes the GL context current.
*/
ContextInfo getContextInfo(ContextType type,
- ContextOptions options = kNone_ContextOptions);
+ ContextOptions options = ContextOptions::kNone);
/**
* Get a GrContext initialized with a type of GL context. It also makes the GL context current.
*/
- GrContext* get(ContextType type, ContextOptions options = kNone_ContextOptions) {
+ GrContext* get(ContextType type, ContextOptions options = ContextOptions::kNone) {
return this->getContextInfo(type, options).grContext();
}
const GrContextOptions& getGlobalOptions() const { return fGlobalOptions; }
@@ -186,4 +186,7 @@ private:
const GrContextOptions fGlobalOptions;
};
} // namespace sk_gpu_test
+
+GR_MAKE_BITFIELD_CLASS_OPS(sk_gpu_test::GrContextFactory::ContextOptions);
+
#endif
« no previous file with comments | « tools/flags/SkCommonFlagsConfig.cpp ('k') | tools/gpu/GrContextFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698