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

Unified Diff: tools/gpu/GrContextFactory.cpp

Issue 1856703002: Revert of Rename enums in GrContextFactory to remove "GL" (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/kilobench/kilobench.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 18fbef811309517178c30ad144216e270eba6283..c2321213326aed4bcd902532afd2e138dcc155e0 100755
--- a/tools/gpu/GrContextFactory.cpp
+++ b/tools/gpu/GrContextFactory.cpp
@@ -74,16 +74,8 @@
}
}
-#if defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_WIN) || defined(SK_BUILD_FOR_MAC)
-const GrContextFactory::ContextType GrContextFactory::kNativeGL_ContextType =
- GrContextFactory::kGL_ContextType;
-#else
-const GrContextFactory::ContextType GrContextFactory::kNativeGL_ContextType =
- GrContextFactory::kGLES_ContextType;
-#endif
-
-GrContextFactory::ContextInfo GrContextFactory::getContextInfo(ContextType type,
- ContextOptions options) {
+GrContextFactory::ContextInfo GrContextFactory::getContextInfo(GLContextType type,
+ GLContextOptions options) {
for (int i = 0; i < fContexts.count(); ++i) {
Context& context = fContexts[i];
if (!context.fGLContext) {
@@ -98,36 +90,39 @@
SkAutoTDelete<GLTestContext> glCtx;
SkAutoTUnref<GrContext> grCtx;
switch (type) {
- case kGL_ContextType:
+ case kNative_GLContextType:
+ glCtx.reset(CreatePlatformGLTestContext(kNone_GrGLStandard));
+ break;
+ case kGL_GLContextType:
glCtx.reset(CreatePlatformGLTestContext(kGL_GrGLStandard));
break;
- case kGLES_ContextType:
+ case kGLES_GLContextType:
glCtx.reset(CreatePlatformGLTestContext(kGLES_GrGLStandard));
break;
#if SK_ANGLE
#ifdef SK_BUILD_FOR_WIN
- case kANGLE_ContextType:
+ case kANGLE_GLContextType:
glCtx.reset(CreateANGLEDirect3DGLTestContext());
break;
#endif
- case kANGLE_GL_ContextType:
+ case kANGLE_GL_GLContextType:
glCtx.reset(CreateANGLEOpenGLGLTestContext());
break;
#endif
#if SK_COMMAND_BUFFER
- case kCommandBuffer_ContextType:
+ case kCommandBuffer_GLContextType:
glCtx.reset(CommandBufferGLTestContext::Create());
break;
#endif
#if SK_MESA
- case kMESA_ContextType:
+ case kMESA_GLContextType:
glCtx.reset(CreateMesaGLTestContext());
break;
#endif
- case kNullGL_ContextType:
+ case kNull_GLContextType:
glCtx.reset(CreateNullGLTestContext());
break;
- case kDebugGL_ContextType:
+ case kDebug_GLContextType:
glCtx.reset(CreateDebugGLTestContext());
break;
}
@@ -139,7 +134,7 @@
// Block NVPR from non-NVPR types.
SkAutoTUnref<const GrGLInterface> glInterface(SkRef(glCtx->gl()));
- if (!(kEnableNVPR_ContextOptions & options)) {
+ if (!(kEnableNVPR_GLContextOptions & options)) {
glInterface.reset(GrGLInterfaceRemoveNVPR(glInterface));
if (!glInterface) {
return ContextInfo();
@@ -148,7 +143,7 @@
glCtx->makeCurrent();
#ifdef SK_VULKAN
- if (kEnableNVPR_ContextOptions & options) {
+ if (kEnableNVPR_GLContextOptions & options) {
return ContextInfo();
} else {
GrBackendContext p3dctx = reinterpret_cast<GrBackendContext>(GrVkBackendContext::Create());
@@ -161,12 +156,12 @@
if (!grCtx.get()) {
return ContextInfo();
}
- if (kEnableNVPR_ContextOptions & options) {
+ if (kEnableNVPR_GLContextOptions & options) {
if (!grCtx->caps()->shaderCaps()->pathRenderingSupport()) {
return ContextInfo();
}
}
- if (kRequireSRGBSupport_ContextOptions & options) {
+ if (kRequireSRGBSupport_GLContextOptions & options) {
if (!grCtx->caps()->srgbSupport()) {
return ContextInfo();
}
« no previous file with comments | « tools/gpu/GrContextFactory.h ('k') | tools/kilobench/kilobench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698