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

Unified Diff: tools/gpu/GrContextFactory.cpp

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/gpu/GrContextFactory.h ('k') | tools/skiaserve/Request.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gpu/GrContextFactory.cpp
diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp
index 2407da930aba3bb3f1fb93e9c53d9a33f8fe5bee..c40764b109c038ec03227a078bc3576c1237458e 100644
--- a/tools/gpu/GrContextFactory.cpp
+++ b/tools/gpu/GrContextFactory.cpp
@@ -31,7 +31,7 @@ GrContextFactory::GrContextFactory() { }
GrContextFactory::GrContextFactory(const GrContextOptions& opts)
: fGlobalOptions(opts) {
- // In this factory, instanced rendering is specified with kUseInstanced_ContextOptions.
+ // In this factory, instanced rendering is specified with ContextOptions::kUseInstanced.
SkASSERT(!fGlobalOptions.fEnableInstancedRendering);
}
@@ -139,7 +139,7 @@ ContextInfo GrContextFactory::getContextInfo(ContextType type, ContextOptions op
break;
#endif
case kNullGL_ContextType:
- glCtx = CreateNullGLTestContext(kEnableNVPR_ContextOptions & options);
+ glCtx = CreateNullGLTestContext(ContextOptions::kEnableNVPR & options);
break;
case kDebugGL_ContextType:
glCtx = CreateDebugGLTestContext();
@@ -154,7 +154,7 @@ ContextInfo GrContextFactory::getContextInfo(ContextType type, ContextOptions op
glInterface.reset(SkRef(glCtx->gl()));
// Block NVPR from non-NVPR types. We don't block NVPR from contexts that will use
// instanced rendering because that would prevent us from testing mixed samples.
- if (!((kEnableNVPR_ContextOptions | kUseInstanced_ContextOptions) & options)) {
+ if (!((ContextOptions::kEnableNVPR | ContextOptions::kUseInstanced) & options)) {
glInterface.reset(GrGLInterfaceRemoveNVPR(glInterface.get()));
if (!glInterface) {
return ContextInfo();
@@ -166,7 +166,7 @@ ContextInfo GrContextFactory::getContextInfo(ContextType type, ContextOptions op
#ifdef SK_VULKAN
case kVulkan_GrBackend:
SkASSERT(kVulkan_ContextType == type);
- if (kEnableNVPR_ContextOptions & options) {
+ if (ContextOptions::kEnableNVPR & options) {
return ContextInfo();
}
testCtx.reset(CreatePlatformVkTestContext());
@@ -192,24 +192,24 @@ ContextInfo GrContextFactory::getContextInfo(ContextType type, ContextOptions op
testCtx->makeCurrent();
SkASSERT(testCtx && testCtx->backend() == backend);
GrContextOptions grOptions = fGlobalOptions;
- if (kUseInstanced_ContextOptions & options) {
+ if (ContextOptions::kUseInstanced & options) {
grOptions.fEnableInstancedRendering = true;
}
grCtx.reset(GrContext::Create(backend, backendContext, grOptions));
if (!grCtx.get()) {
return ContextInfo();
}
- if (kEnableNVPR_ContextOptions & options) {
+ if (ContextOptions::kEnableNVPR & options) {
if (!grCtx->caps()->shaderCaps()->pathRenderingSupport()) {
return ContextInfo();
}
}
- if (kUseInstanced_ContextOptions & options) {
+ if (ContextOptions::kUseInstanced & options) {
if (GrCaps::InstancedSupport::kNone == grCtx->caps()->instancedSupport()) {
return ContextInfo();
}
}
- if (kRequireSRGBSupport_ContextOptions & options) {
+ if (ContextOptions::kRequireSRGBSupport & options) {
if (!grCtx->caps()->srgbSupport()) {
return ContextInfo();
}
« no previous file with comments | « tools/gpu/GrContextFactory.h ('k') | tools/skiaserve/Request.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698