Encapulate the ESSL compiler into a GL object that is per-context.

 * Allows for multiple contexts have to have different client versions, caps
   and extensions without causing shader compilation failures.

BUG=angle:823

Change-Id: I523679e90be031b0b7fa385d46d6839b1cf3029f
Reviewed-on: https://chromium-review.googlesource.com/227710
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/Compiler.cpp b/src/libANGLE/Compiler.cpp
new file mode 100644
index 0000000..7d0efea
--- /dev/null
+++ b/src/libANGLE/Compiler.cpp
@@ -0,0 +1,38 @@
+//
+// Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+// Compiler.cpp: implements the gl::Compiler class.
+
+#include "libANGLE/Compiler.h"
+#include "libANGLE/renderer/CompilerImpl.h"
+
+#include "common/debug.h"
+
+namespace gl
+{
+
+Compiler::Compiler(rx::CompilerImpl *impl)
+    : mCompiler(impl)
+{
+    ASSERT(mCompiler);
+}
+
+Compiler::~Compiler()
+{
+    SafeDelete(mCompiler);
+}
+
+Error Compiler::release()
+{
+    return mCompiler->release();
+}
+
+rx::CompilerImpl *Compiler::getImplementation()
+{
+    return mCompiler;
+}
+
+}