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

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

Issue 16955005: Add MESA detection to GrContextInfo and use to decide whether to use GL_ALPHA or GL_RED. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix comment type Created 7 years, 6 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/GrGLUtil.h ('k') | 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 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.");
« no previous file with comments | « src/gpu/gl/GrGLUtil.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698