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*); |