Index: src/gpu/gl/GrGLUtil.cpp |
diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp |
index 08bbebcbb04a967ab24fe39894e27c6cd7ef925c..a13b03de77577166f5e231b53e15bd08d15fe562 100644 |
--- a/src/gpu/gl/GrGLUtil.cpp |
+++ b/src/gpu/gl/GrGLUtil.cpp |
@@ -121,6 +121,12 @@ GrGLBinding GrGLGetBindingInUseFromString(const char* versionString) { |
return kNone_GrGLBinding; |
} |
+bool GrGLIsMesaFromVersionString(const char* versionString) { |
+ int major, minor, mesaMajor, mesaMinor; |
+ int n = sscanf(versionString, "%d.%d Mesa %d.%d", &major, &minor, &mesaMajor, &mesaMinor); |
+ return 4 == n; |
+} |
+ |
GrGLVersion GrGLGetVersionFromString(const char* versionString) { |
if (NULL == versionString) { |
GrAssert(!"NULL GL version string."); |