Add 4.20 as a GLSL output version.

GLSL 4.20 adds support for image functions which will be used in forthcoming changes.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4833

Change-Id: I8cab511d95f04b45faaf916628148117b8be2128
Reviewed-on: https://skia-review.googlesource.com/4833
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index ed3c381..d1c1162 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -622,6 +622,14 @@
             } else {
                 return "#version 400 compatibility\n";
             }
+        case k420_GrGLSLGeneration:
+            SkASSERT(kGL_GrGLStandard == standard);
+            if (isCoreProfile) {
+                return "#version 420\n";
+            }
+            else {
+                return "#version 420 compatibility\n";
+            }
         case k310es_GrGLSLGeneration:
             SkASSERT(kGLES_GrGLStandard == standard);
             return "#version 310 es\n";
diff --git a/src/gpu/gl/GrGLGLSL.cpp b/src/gpu/gl/GrGLGLSL.cpp
index e5aed03..7813eab 100644
--- a/src/gpu/gl/GrGLGLSL.cpp
+++ b/src/gpu/gl/GrGLGLSL.cpp
@@ -19,7 +19,9 @@
     switch (gl->fStandard) {
         case kGL_GrGLStandard:
             SkASSERT(ver >= GR_GLSL_VER(1,10));
-            if (ver >= GR_GLSL_VER(4,00)) {
+            if (ver >= GR_GLSL_VER(4,20)) {
+                *generation = k420_GrGLSLGeneration;
+            } else if (ver >= GR_GLSL_VER(4,00)) {
                 *generation = k400_GrGLSLGeneration;
             } else if (ver >= GR_GLSL_VER(3,30)) {
                 *generation = k330_GrGLSLGeneration;
diff --git a/src/gpu/glsl/GrGLSL.cpp b/src/gpu/glsl/GrGLSL.cpp
index bec4784..69f046c 100644
--- a/src/gpu/glsl/GrGLSL.cpp
+++ b/src/gpu/glsl/GrGLSL.cpp
@@ -18,6 +18,7 @@
         case k150_GrGLSLGeneration:
         case k330_GrGLSLGeneration:
         case k400_GrGLSLGeneration:
+        case k420_GrGLSLGeneration:
         case k310es_GrGLSLGeneration:
         case k320es_GrGLSLGeneration:
             return true;
diff --git a/src/gpu/glsl/GrGLSL.h b/src/gpu/glsl/GrGLSL.h
index e6559fd..93eee31 100644
--- a/src/gpu/glsl/GrGLSL.h
+++ b/src/gpu/glsl/GrGLSL.h
@@ -41,6 +41,10 @@
      */
     k400_GrGLSLGeneration,
     /**
+     * Desktop GLSL 4.20
+     */
+    k420_GrGLSLGeneration,
+    /**
      * ES GLSL 3.10 only TODO Make GLSLCap objects to make this more granular
      */
     k310es_GrGLSLGeneration,