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

Unified Diff: src/gpu/GrContextFactory.h

Issue 1548683002: Revert of Add config options to run different GPU APIs to dm and nanobench (Closed) Base URL: https://skia.googlesource.com/skia.git@commandbuffer-as-api-03-context-factory-glcontext-type
Patch Set: Created 5 years 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 | « src/core/SkString.cpp ('k') | src/gpu/GrContextFactory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrContextFactory.h
diff --git a/src/gpu/GrContextFactory.h b/src/gpu/GrContextFactory.h
index 1df99d6ff1f88d1e516ac024c302eafcc25b9159..50978138174a22c22b68f45727b1e32a96aab8bf 100644
--- a/src/gpu/GrContextFactory.h
+++ b/src/gpu/GrContextFactory.h
@@ -24,23 +24,19 @@
class GrContextFactory : SkNoncopyable {
public:
enum GLContextType {
- kNative_GLContextType, //! OpenGL or OpenGL ES context.
- kGL_GLContextType, //! OpenGL context.
- kGLES_GLContextType, //! OpenGL ES context.
+ kNative_GLContextType,
#if SK_ANGLE
-#ifdef SK_BUILD_FOR_WIN
- kANGLE_GLContextType, //! ANGLE on DirectX OpenGL ES context.
-#endif
- kANGLE_GL_GLContextType, //! ANGLE on OpenGL OpenGL ES context.
+ kANGLE_GLContextType,
+ kANGLE_GL_GLContextType,
#endif
#if SK_COMMAND_BUFFER
- kCommandBuffer_GLContextType, //! Chromium command buffer OpenGL ES context.
+ kCommandBuffer_GLContextType,
#endif
#if SK_MESA
- kMESA_GLContextType, //! MESA OpenGL context
+ kMESA_GLContextType,
#endif
- kNull_GLContextType, //! Non-rendering OpenGL mock context.
- kDebug_GLContextType, //! Non-rendering, state verifying OpenGL context.
+ kNull_GLContextType,
+ kDebug_GLContextType,
kLastGLContextType = kDebug_GLContextType
};
@@ -69,15 +65,11 @@
switch (type) {
case kNative_GLContextType:
return "native";
- case kGL_GLContextType:
- return "gl";
- case kGLES_GLContextType:
- return "gles";
+ case kNull_GLContextType:
+ return "null";
#if SK_ANGLE
-#ifdef SK_BUILD_FOR_WIN
case kANGLE_GLContextType:
return "angle";
-#endif
case kANGLE_GL_GLContextType:
return "angle-gl";
#endif
@@ -89,8 +81,6 @@
case kMESA_GLContextType:
return "mesa";
#endif
- case kNull_GLContextType:
- return "null";
case kDebug_GLContextType:
return "debug";
default:
@@ -134,14 +124,15 @@
* Get a context initialized with a type of GL context. It also makes the GL context current.
* Pointer is valid until destroyContexts() is called.
*/
- ContextInfo* getContextInfo(GLContextType type,
+ ContextInfo* getContextInfo(GLContextType type, GrGLStandard forcedGpuAPI = kNone_GrGLStandard,
GLContextOptions options = kNone_GLContextOptions);
/**
* Get a GrContext initialized with a type of GL context. It also makes the GL context current.
*/
- GrContext* get(GLContextType type, GLContextOptions options = kNone_GLContextOptions) {
- if (ContextInfo* info = this->getContextInfo(type, options)) {
+ GrContext* get(GLContextType type, GrGLStandard forcedGpuAPI = kNone_GrGLStandard,
+ GLContextOptions options = kNone_GLContextOptions) {
+ if (ContextInfo* info = this->getContextInfo(type, forcedGpuAPI, options)) {
return info->fGrContext;
}
return nullptr;
« no previous file with comments | « src/core/SkString.cpp ('k') | src/gpu/GrContextFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698