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

Unified Diff: src/gpu/gl/GrGLUtil.h

Issue 1165463005: Begin tracking driver info in GrGLContextInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 7 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 | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/gl/GrGLUtil.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLUtil.h
diff --git a/src/gpu/gl/GrGLUtil.h b/src/gpu/gl/GrGLUtil.h
index 3646de548ece515f4cd1f5f926e42561d6fed0e9..3a7f4505f7453efbc640d9a32e164f359e76d76a 100644
--- a/src/gpu/gl/GrGLUtil.h
+++ b/src/gpu/gl/GrGLUtil.h
@@ -18,14 +18,18 @@ class SkMatrix;
typedef uint32_t GrGLVersion;
typedef uint32_t GrGLSLVersion;
+typedef uint32_t GrGLDriverVersion;
#define GR_GL_VER(major, minor) ((static_cast<int>(major) << 16) | \
static_cast<int>(minor))
#define GR_GLSL_VER(major, minor) ((static_cast<int>(major) << 16) | \
static_cast<int>(minor))
+#define GR_GL_DRIVER_VER(major, minor) ((static_cast<int>(major) << 16) | \
+ static_cast<int>(minor))
#define GR_GL_INVALID_VER GR_GL_VER(0, 0)
-#define GR_GLSL_INVALID_VER GR_GL_VER(0, 0)
+#define GR_GLSL_INVALID_VER GR_GLSL_VER(0, 0)
+#define GR_GL_DRIVER_UNKNOWN_VER GR_GL_DRIVER_VER(0, 0)
/**
* The Vendor and Renderer enum values are lazily updated as required.
@@ -50,6 +54,13 @@ enum GrGLRenderer {
kOther_GrGLRenderer
};
+enum GrGLDriver {
+ kMesa_GrGLDriver,
+ kChromium_GrGLDriver,
+ kNVIDIA_GrGLDriver,
+ kUnknown_GrGLDriver
+};
+
////////////////////////////////////////////////////////////////////////////////
/**
@@ -98,10 +109,15 @@ enum GrGLRenderer {
GrGLVersion GrGLGetVersionFromString(const char* versionString);
GrGLStandard GrGLGetStandardInUseFromString(const char* versionString);
GrGLSLVersion GrGLGetGLSLVersionFromString(const char* versionString);
-bool GrGLIsMesaFromVersionString(const char* versionString);
GrGLVendor GrGLGetVendorFromString(const char* vendorString);
GrGLRenderer GrGLGetRendererFromString(const char* rendererString);
-bool GrGLIsChromiumFromRendererString(const char* rendererString);
+
+void GrGLGetDriverInfo(GrGLStandard standard,
+ GrGLVendor vendor,
+ const char* rendererString,
+ const char* versionString,
+ GrGLDriver* outDriver,
+ GrGLDriverVersion* outVersion);
// these variants call glGetString()
GrGLVersion GrGLGetVersion(const GrGLInterface*);
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/gl/GrGLUtil.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698