Add MESA detection to GrContextInfo and use to decide whether to use GL_ALPHA or GL_RED.

Based on yunchao.he@intel.com's original change here: https://codereview.chromium.org/15994006/

R=yunchao.he@intel.com, robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://chromiumcodereview.appspot.com/16955005

git-svn-id: http://skia.googlecode.com/svn/trunk@9608 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLContext.h b/src/gpu/gl/GrGLContext.h
index 172cd8b..34f2190 100644
--- a/src/gpu/gl/GrGLContext.h
+++ b/src/gpu/gl/GrGLContext.h
@@ -47,6 +47,8 @@
     GrGLVersion version() const { return fGLVersion; }
     GrGLSLGeneration glslGeneration() const { return fGLSLGeneration; }
     GrGLVendor vendor() const { return fVendor; }
+    /** Is this a mesa-based driver. Does not mean it is the osmesa software rasterizer. */
+    bool isMesa() const { return fIsMesa; }
     const GrGLCaps* caps() const { return fGLCaps.get(); }
     GrGLCaps* caps() { return fGLCaps; }
     const GrGLExtensions& extensions() const { return fExtensions; }
@@ -73,6 +75,7 @@
     GrGLSLGeneration        fGLSLGeneration;
     GrGLVendor              fVendor;
     GrGLExtensions          fExtensions;
+    bool                    fIsMesa;
     SkAutoTUnref<GrGLCaps>  fGLCaps;
 };