Check for a non-null GrContext on the media::Context3D during paint.

The code checks that a ContextProvider was able to be found by checking
the |gl| field. But if the ContextProvider was created but lost, and
GrContext was not created yet, then it will fail to initialize and be
null. We should avoid trying to use this context then (and not crash).

[email protected]
BUG=612087

Review-Url: https://codereview.chromium.org/2003833002
Cr-Commit-Position: refs/heads/master@{#395222}
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index 0578c9a..0b6354a 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -718,9 +718,10 @@
   if (video_frame.get() && video_frame->HasTextures()) {
     if (!context_3d_cb_.is_null())
       context_3d = context_3d_cb_.Run();
-    // GPU Process crashed.
     if (!context_3d.gl)
-      return;
+      return;  // Unable to get/create a shared main thread context.
+    if (!context_3d.gr_context)
+      return;  // The context has been lost since and can't setup a GrContext.
   }
   skcanvas_video_renderer_.Paint(video_frame, canvas, gfx::RectF(gfx_rect),
                                  alpha, mode, pipeline_metadata_.video_rotation,