Recognize that ES3 supports texture storage. Add workaround for apparent Adreno bug.

R=robertphillips@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10845 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 4123a01..e2ecfd7 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -160,11 +160,17 @@
     fTextureUsageSupport = (kES_GrGLBinding == binding) &&
                             ctxInfo.hasExtension("GL_ANGLE_texture_usage");
 
-    // Tex storage is in desktop 4.2 and can be an extension to desktop or ES.
-    fTexStorageSupport = (kDesktop_GrGLBinding == binding &&
-                          version >= GR_GL_VER(4,2)) ||
-                         ctxInfo.hasExtension("GL_ARB_texture_storage") ||
-                         ctxInfo.hasExtension("GL_EXT_texture_storage");
+    if (kDesktop_GrGLBinding == binding) {
+        // The EXT version can apply to either GL or GLES.
+        fTexStorageSupport = version >= GR_GL_VER(4,2) ||
+                             ctxInfo.hasExtension("GL_ARB_texture_storage") ||
+                             ctxInfo.hasExtension("GL_EXT_texture_storage");
+    } else {
+        // Qualcomm Adreno drivers appear to have issues with texture storage.
+        fTexStorageSupport = (version >= GR_GL_VER(3,0) &&
+                              kQualcomm_GrGLVendor != ctxInfo.vendor()) ||
+                             ctxInfo.hasExtension("GL_EXT_texture_storage");
+    }
 
     // ARB_texture_rg is part of OpenGL 3.0, but mesa doesn't support it if
     // it doesn't have ARB_texture_rg extension.