Add fPreferExternalImagesOverES3 to GrContextOptions

This forces us to use the ES2 shading language when we have an ES3
context, but the driver claims to only support GL_OES_EGL_image_external
(and not the _essl3 variant). Many of these devices will work correctly
if we blindly enable both extensions, but there are some that won't.

Bug: skia:
Change-Id: Id632003a1905ea61b46166befd30905a57cead69
Reviewed-on: https://skia-review.googlesource.com/126681
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/include/gpu/GrContextOptions.h b/include/gpu/GrContextOptions.h
index 69ea181..3a0fba1 100644
--- a/include/gpu/GrContextOptions.h
+++ b/include/gpu/GrContextOptions.h
@@ -171,6 +171,13 @@
     Enable fSortRenderTargets = Enable::kDefault;
 
     /**
+     * Some ES3 contexts report the ES2 external image extension, but not the ES3 version.
+     * If support for external images is critical, enabling this option will cause Ganesh to limit
+     * shaders to the ES2 shading language in that situation.
+     */
+    bool fPreferExternalImagesOverES3 = false;
+
+    /**
      * Disables correctness workarounds that are enabled for particular GPUs, OSes, or drivers.
      * This does not affect code path choices that are made for perfomance reasons nor does it
      * override other GrContextOption settings.