Fiddle can use EGL if available.

To test this turn on egl, e.g. --args='skia_use_egl=true', and run by altering the
library path to point to the right directory of the EGL driver you want to use, for example:

  LD_LIBRARY_PATH=/usr/lib/nvidia-367/ ./out/Release/fiddle  | ./tools/fiddle/parse-fiddle-output 

Bug: skia:
Change-Id: I2cce80318925fe88f9407646acb67628a8e48810
Reviewed-on: https://skia-review.googlesource.com/18137
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index f66ffc7..18a62f0 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -760,14 +760,21 @@
     # TODO: worth fixing?
     executable("fiddle") {
       libs = []
-      if (is_linux) {
-        libs += [ "OSMesa" ]
-      }
-
       sources = [
         "tools/fiddle/draw.cpp",
         "tools/fiddle/fiddle_main.cpp",
       ]
+
+      if (skia_use_egl) {
+        sources += [ "tools/fiddle/egl_context.cpp" ]
+      } else if (skia_use_mesa) {
+        sources += [ "tools/fiddle/mesa_context.cpp" ]
+        if (is_linux) {
+          libs += [ "OSMesa" ]
+        }
+      } else {
+        sources += [ "tools/fiddle/null_context.cpp" ]
+      }
       testonly = true
       deps = [
         ":flags",