Index: chromecast/ui/gl/gl_context_cast.cc |
diff --git a/chromecast/ui/gl/gl_context_cast.cc b/chromecast/ui/gl/gl_context_cast.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c6c6d850cd917645142dcbab185d612bdbf6acc2 |
--- /dev/null |
+++ b/chromecast/ui/gl/gl_context_cast.cc |
@@ -0,0 +1,24 @@ |
+// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "ui/gl/gl_context.h" |
+ |
+#include "ui/gl/gl_context_stub.h" |
+#include "ui/gl/gl_implementation.h" |
+ |
+namespace gfx { |
+ |
+scoped_refptr<GLContext> GLContext::CreateGLContext( |
+ GLShareGroup* share_group, |
+ GLSurface* compatible_surface, |
+ GpuPreference gpu_preference) { |
+ switch (GetGLImplementation()) { |
+ case kGLImplementationMockGL: |
+ return new GLContextStub; |
+ default: |
+ return NULL; |
+ } |
+} |
+ |
+} // namespace gfx |