Index: src/gpu/gl/GrGLUtil.cpp |
diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp |
index e6ebb2b653421516e9f87d8111d32ce36707e803..96e26c78261be5cd407502c787cc69c2fd980673 100644 |
--- a/src/gpu/gl/GrGLUtil.cpp |
+++ b/src/gpu/gl/GrGLUtil.cpp |
@@ -94,8 +94,18 @@ GrGLStandard GrGLGetStandardInUseFromString(const char* versionString) { |
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; |
+ |
+ GrGLStandard standard = GrGLGetStandardInUseFromString(versionString); |
+ |
+ if (standard == kGL_GrGLStandard) { |
+ int n = sscanf(versionString, "%d.%d Mesa %d.%d", &major, &minor, &mesaMajor, &mesaMinor); |
+ return 4 == n; |
+ } |
+ else { |
+ int n = sscanf(versionString, "OpenGL ES %d.%d Mesa %d.%d", &major, &minor, &mesaMajor, &mesaMinor); |
+ return 4 == n; |
+ } |
+ return false; |
} |
bool GrGLIsChromiumFromRendererString(const char* rendererString) { |