Pass gl::Context to impl methods instead of ContextImpl.

In some cases we might have to call back into the GL layer, passing
the Context, and if we just have a ContextImpl pointer this isn't
possible. It also removes the need for SafeGetImpl.

BUG=angleproject:2044

Change-Id: I6363e84b25648c992c25779d4c43f795aa2866d6
Reviewed-on: https://chromium-review.googlesource.com/516835
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/d3d/ProgramD3D.cpp b/src/libANGLE/renderer/d3d/ProgramD3D.cpp
index b8df596..11ed561 100644
--- a/src/libANGLE/renderer/d3d/ProgramD3D.cpp
+++ b/src/libANGLE/renderer/d3d/ProgramD3D.cpp
@@ -10,6 +10,7 @@
 
 #include "common/bitset_utils.h"
 #include "common/utilities.h"
+#include "libANGLE/Context.h"
 #include "libANGLE/Framebuffer.h"
 #include "libANGLE/FramebufferAttachment.h"
 #include "libANGLE/Program.h"
@@ -691,7 +692,7 @@
     }
 }
 
-LinkResult ProgramD3D::load(const ContextImpl *contextImpl,
+LinkResult ProgramD3D::load(const gl::Context *context,
                             gl::InfoLog &infoLog,
                             gl::BinaryInputStream *stream)
 {
@@ -1479,11 +1480,11 @@
     return mComputeExecutable.get() != nullptr;
 }
 
-LinkResult ProgramD3D::link(ContextImpl *contextImpl,
+LinkResult ProgramD3D::link(const gl::Context *context,
                             const gl::VaryingPacking &packing,
                             gl::InfoLog &infoLog)
 {
-    const auto &data = contextImpl->getContextState();
+    const auto &data = context->getContextState();
 
     reset();