WebGL2: Add BlitFramebuffer, ShaderDerivativeSupport

fix from paraboul@

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-EMCC-GCE-GPU-AVX2-wasm-Release-All-CanvasKit,Test-Debian9-EMCC-GCE-CPU-AVX2-wasm-Release-All-CanvasKit

Bug: skia:9052
Change-Id: If0c408f33f4bb6cd47513a2c1f3a1e3ac3da3320
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249228
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
diff --git a/src/gpu/gl/GrGLAssembleWebGLInterfaceAutogen.cpp b/src/gpu/gl/GrGLAssembleWebGLInterfaceAutogen.cpp
index 9202de8..e48e525 100644
--- a/src/gpu/gl/GrGLAssembleWebGLInterfaceAutogen.cpp
+++ b/src/gpu/gl/GrGLAssembleWebGLInterfaceAutogen.cpp
@@ -203,6 +203,10 @@
     GET_PROC(RenderbufferStorage);
 
     if (glVer >= GR_GL_VER(2,0)) {
+        GET_PROC(BlitFramebuffer);
+    }
+
+    if (glVer >= GR_GL_VER(2,0)) {
         GET_PROC(RenderbufferStorageMultisample);
     }
 
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 3142399..070a8e9 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -392,7 +392,8 @@
         shaderCaps->fIntegerSupport = version >= GR_GL_VER(3, 0) &&
             ctxInfo.glslGeneration() >= k330_GrGLSLGeneration; // We use this value for GLSL ES 3.0.
     } else if (GR_IS_GR_WEBGL(standard)) {
-        shaderCaps->fShaderDerivativeSupport = ctxInfo.hasExtension("GL_OES_standard_derivatives") ||
+        shaderCaps->fShaderDerivativeSupport = version >= GR_GL_VER(2, 0) ||
+                                               ctxInfo.hasExtension("GL_OES_standard_derivatives") ||
                                                ctxInfo.hasExtension("OES_standard_derivatives");
     }
 
diff --git a/src/gpu/gl/GrGLInterfaceAutogen.cpp b/src/gpu/gl/GrGLInterfaceAutogen.cpp
index dd1207e..b366843 100644
--- a/src/gpu/gl/GrGLInterfaceAutogen.cpp
+++ b/src/gpu/gl/GrGLInterfaceAutogen.cpp
@@ -395,7 +395,9 @@
        (GR_IS_GR_GL_ES(fStandard) && (
           (glVer >= GR_GL_VER(3,0)) ||
           fExtensions.has("GL_CHROMIUM_framebuffer_multisample") ||
-          fExtensions.has("GL_ANGLE_framebuffer_blit")))) {
+          fExtensions.has("GL_ANGLE_framebuffer_blit"))) ||
+       (GR_IS_GR_WEBGL(fStandard) && (
+          (glVer >= GR_GL_VER(2,0))))) {
         if (!fFunctions.fBlitFramebuffer) {
             RETURN_FALSE_INTERFACE;
         }
diff --git a/tools/gpu/gl/interface/interface.json5 b/tools/gpu/gl/interface/interface.json5
index ceb3f44..1424294 100644
--- a/tools/gpu/gl/interface/interface.json5
+++ b/tools/gpu/gl/interface/interface.json5
@@ -318,7 +318,7 @@
     "GLES":  [{"min_version": [3, 0], "ext": "<core>"},
               {/*    else if      */  "ext": "GL_CHROMIUM_framebuffer_multisample"},
               {/*    else if      */  "ext": "GL_ANGLE_framebuffer_blit"}],
-    // WebGL 2.0 might have support for blitFramebuffer and related functions.
+    "WebGL": [{"min_version": [2, 0], "ext": "<core>"}],
 
     "functions": [
       "BlitFramebuffer",