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

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

Issue 430833002: Test removal of mesa specific version parse (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLUtil.cpp
diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp
index 6a2eb6e17ee0e62c94723e859cbc78ad8d7ef3e9..86a3a59e914131d0e441875ad02b1ca8eb7f214d 100644
--- a/src/gpu/gl/GrGLUtil.cpp
+++ b/src/gpu/gl/GrGLUtil.cpp
@@ -50,41 +50,6 @@ void GrGLCheckErr(const GrGLInterface* gl,
}
}
-namespace {
-// Mesa uses a non-standard version string of format: 1.4 Mesa <mesa_major>.<mesa_minor>.
-// The mapping of from mesa version to GL version came from here: http://www.mesa3d.org/intro.html
-bool get_gl_version_for_mesa(int mesaMajorVersion, int* major, int* minor) {
- switch (mesaMajorVersion) {
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- *major = 1;
- *minor = mesaMajorVersion - 1;
- return true;
- case 7:
- *major = 2;
- *minor = 1;
- return true;
- case 8:
- *major = 3;
- *minor = 0;
- return true;
- case 9:
- *major = 3;
- *minor = 1;
- return true;
- case 10:
- *major = 3;
- *minor = 3;
- return true;
- default:
- return false;
- }
-}
-}
-
///////////////////////////////////////////////////////////////////////////////
#if GR_GL_LOG_CALLS
@@ -149,11 +114,7 @@ GrGLVersion GrGLGetVersionFromString(const char* versionString) {
int mesaMajor, mesaMinor;
int n = sscanf(versionString, "%d.%d Mesa %d.%d", &major, &minor, &mesaMajor, &mesaMinor);
if (4 == n) {
- if (get_gl_version_for_mesa(mesaMajor, &major, &minor)) {
- return GR_GL_VER(major, minor);
- } else {
- return GR_GL_INVALID_VER;
- }
+ return GR_GL_VER(major, minor);
}
n = sscanf(versionString, "%d.%d", &major, &minor);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698