Revert "Support GL_EXT_draw_buffers"

This reverts commit 77af4ecd3546e38e8b6ca6e0efbc6b9df65dc83a.

Reason for revert: iOS errors and bad images on Gold

Original change's description:
> Support GL_EXT_draw_buffers
> 
> Change-Id: I078aa7c42de4368602b0ef43bd7e18efbfd1e049
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212182
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: Ib8759d4a1009f9a8774365a699e211834d634cff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212264
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/src/gpu/gl/GrGLAssembleGLESInterfaceAutogen.cpp b/src/gpu/gl/GrGLAssembleGLESInterfaceAutogen.cpp
index 53b50e1..73aacc1 100644
--- a/src/gpu/gl/GrGLAssembleGLESInterfaceAutogen.cpp
+++ b/src/gpu/gl/GrGLAssembleGLESInterfaceAutogen.cpp
@@ -187,11 +187,6 @@
 
     if (glVer >= GR_GL_VER(3,0)) {
         GET_PROC(DrawBuffers);
-    } else if (extensions.has("GL_EXT_draw_buffers")) {
-        GET_PROC_SUFFIX(DrawBuffers, EXT);
-    }
-
-    if (glVer >= GR_GL_VER(3,0)) {
         GET_PROC(ReadBuffer);
     }
 
diff --git a/src/gpu/gl/GrGLAssembleGLInterfaceAutogen.cpp b/src/gpu/gl/GrGLAssembleGLInterfaceAutogen.cpp
index a808937..b39d9d9 100644
--- a/src/gpu/gl/GrGLAssembleGLInterfaceAutogen.cpp
+++ b/src/gpu/gl/GrGLAssembleGLInterfaceAutogen.cpp
@@ -194,7 +194,6 @@
     }
 
     GET_PROC(DrawBuffers);
-
     GET_PROC(ReadBuffer);
 
     if (glVer >= GR_GL_VER(4,0)) {
diff --git a/src/gpu/gl/GrGLAssembleWebGLInterfaceAutogen.cpp b/src/gpu/gl/GrGLAssembleWebGLInterfaceAutogen.cpp
index 1a32bf6..1516368 100644
--- a/src/gpu/gl/GrGLAssembleWebGLInterfaceAutogen.cpp
+++ b/src/gpu/gl/GrGLAssembleWebGLInterfaceAutogen.cpp
@@ -169,9 +169,6 @@
 
     if (glVer >= GR_GL_VER(2,0)) {
         GET_PROC(DrawBuffers);
-    }
-
-    if (glVer >= GR_GL_VER(2,0)) {
         GET_PROC(ReadBuffer);
     }
 
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 460365c..c22daa1 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -323,15 +323,6 @@
     fSupportsAHardwareBufferImages = true;
 #endif
 
-    if (GR_IS_GR_GL(standard)) {
-        fDrawBuffersSupport = true;
-    } else if (GR_IS_GR_GL_ES(standard)) {
-        fDrawBuffersSupport = (version >= GR_GL_VER(3, 0)) ||
-                              ctxInfo.hasExtension("GL_EXT_draw_buffers");
-    } else if (GR_IS_GR_WEBGL(standard)) {
-        fDrawBuffersSupport = version >= GR_GL_VER(2, 0);
-    }
-
     /**************************************************************************
     * GrShaderCaps fields
     **************************************************************************/
diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h
index 8dd09a6..e845c32 100644
--- a/src/gpu/gl/GrGLCaps.h
+++ b/src/gpu/gl/GrGLCaps.h
@@ -419,8 +419,6 @@
 
     bool fbFetchRequiresEnablePerSample() const { return fFBFetchRequiresEnablePerSample; }
 
-    bool drawBuffersSupport() const { return fDrawBuffersSupport; }
-
     GrPixelConfig validateBackendRenderTarget(const GrBackendRenderTarget&,
                                               SkColorType) const override;
 
@@ -509,7 +507,6 @@
     bool fProgramBinarySupport : 1;
     bool fSamplerObjectSupport : 1;
     bool fFBFetchRequiresEnablePerSample : 1;
-    bool fDrawBuffersSupport : 1;
 
     // Driver workarounds
     bool fDoManualMipmapping : 1;
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index fe05fd3..0a044b6 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -3124,22 +3124,13 @@
 void GrGLGpu::flushColorWrite(bool writeColor) {
     if (!writeColor) {
         if (kNo_TriState != fHWWriteToColor) {
-            if (this->glCaps().drawBuffersSupport()) {
-                const GrGLenum drawBuffer = GR_GL_NONE;
-                GL_CALL(DrawBuffers(1, &drawBuffer));
-            } else {
-                GL_CALL(ColorMask(GR_GL_FALSE, GR_GL_FALSE, GR_GL_FALSE, GR_GL_FALSE));
-            }
+            GL_CALL(ColorMask(GR_GL_FALSE, GR_GL_FALSE,
+                              GR_GL_FALSE, GR_GL_FALSE));
             fHWWriteToColor = kNo_TriState;
         }
     } else {
         if (kYes_TriState != fHWWriteToColor) {
-            if (this->glCaps().drawBuffersSupport()) {
-                const GrGLenum drawBuffer = GR_GL_COLOR_ATTACHMENT0;
-                GL_CALL(DrawBuffers(1, &drawBuffer));
-            } else {
-                GL_CALL(ColorMask(GR_GL_TRUE, GR_GL_TRUE, GR_GL_TRUE, GR_GL_TRUE));
-            }
+            GL_CALL(ColorMask(GR_GL_TRUE, GR_GL_TRUE, GR_GL_TRUE, GR_GL_TRUE));
             fHWWriteToColor = kYes_TriState;
         }
     }
diff --git a/src/gpu/gl/GrGLInterfaceAutogen.cpp b/src/gpu/gl/GrGLInterfaceAutogen.cpp
index a404ee6..c2c8a5e 100644
--- a/src/gpu/gl/GrGLInterfaceAutogen.cpp
+++ b/src/gpu/gl/GrGLInterfaceAutogen.cpp
@@ -220,21 +220,11 @@
 
     if (GR_IS_GR_GL(fStandard) ||
        (GR_IS_GR_GL_ES(fStandard) && (
-          (glVer >= GR_GL_VER(3,0)) ||
-          fExtensions.has("GL_EXT_draw_buffers"))) ||
-       (GR_IS_GR_WEBGL(fStandard) && (
-          (glVer >= GR_GL_VER(2,0))))) {
-        if (!fFunctions.fDrawBuffers) {
-            RETURN_FALSE_INTERFACE;
-        }
-    }
-
-    if (GR_IS_GR_GL(fStandard) ||
-       (GR_IS_GR_GL_ES(fStandard) && (
           (glVer >= GR_GL_VER(3,0)))) ||
        (GR_IS_GR_WEBGL(fStandard) && (
           (glVer >= GR_GL_VER(2,0))))) {
-        if (!fFunctions.fReadBuffer) {
+        if (!fFunctions.fDrawBuffers ||
+            !fFunctions.fReadBuffer) {
             RETURN_FALSE_INTERFACE;
         }
     }
diff --git a/tools/gpu/gl/interface/interface.json5 b/tools/gpu/gl/interface/interface.json5
index 960948c..731712e 100644
--- a/tools/gpu/gl/interface/interface.json5
+++ b/tools/gpu/gl/interface/interface.json5
@@ -137,21 +137,11 @@
   },
   { // ES 3.0 has glDrawBuffers but not glDrawBuffer
     "GL":    [{"ext": "<core>"}],
-    "GLES":  [{"min_version": [3, 0], "ext": "<core>"},
-              {/*    else if      */  "ext": "GL_EXT_draw_buffers"}],
-    "WebGL": [{"min_version": [2, 0], "ext": "<core>"}],
-
-    "functions": [
-      "DrawBuffers",
-    ]
-  },
-  { // ES 2.0 w/GL_EXT_draw_buffers has glDrawBuffers but not glReadBuffer
-    "GL":    [{"ext": "<core>"}],
     "GLES":  [{"min_version": [3, 0], "ext": "<core>"}],
     "WebGL": [{"min_version": [2, 0], "ext": "<core>"}],
 
     "functions": [
-      "ReadBuffer",
+      "DrawBuffers", "ReadBuffer",
     ]
   },