Add GL_CHROMIUM_framebuffer_multisample support.

Review URL: http://codereview.appspot.com/4287072/



git-svn-id: http://skia.googlecode.com/svn/trunk@984 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrGLInterface.cpp b/gpu/src/GrGLInterface.cpp
index 702b057..9c3d5bb 100644
--- a/gpu/src/GrGLInterface.cpp
+++ b/gpu/src/GrGLInterface.cpp
@@ -212,11 +212,26 @@
         fboFound = true;
     }
     #endif
-
-    #if GL_APPLE_framebuffer_multisample
-    if (has_gl_extension_from_string("GL_APPLE_framebuffer_multisample",
+    bool msaaFound = false;
+    // Chrome advertises the equivalent of GL_EXT_framebuffer_blit plus
+    // GL_EXT_framebuffer_multisample as GL_CHROMIUM_framebuffer_multisample
+    // The EXT suffixes are used on the functions, however.
+    #if GL_EXT_framebuffer_multisample
+    if (!msaaFound &&
+        has_gl_extension_from_string("GL_CHROMIUM_framebuffer_multisample",
                                      extensionString)) {
+        GR_GL_GET_PROC_SUFFIX(RenderbufferStorageMultisample, EXT);
+        GR_GL_GET_PROC_SUFFIX(BlitFramebuffer, EXT);
+        msaaFound = true;
+    }
+    #endif
+    #if GL_APPLE_framebuffer_multisample
+    if (!msaaFound && 
+        has_gl_extension_from_string("GL_APPLE_framebuffer_multisample",
+                                     extensionString)) {
+        GR_GL_GET_PROC_SUFFIX(RenderbufferStorageMultisample, APPLE);
         GR_GL_GET_PROC_SUFFIX(ResolveMultisampleFramebuffer, APPLE);
+        msaaFound = true;
     }
     #endif