Index: ui/gfx/gl/gl_context_wayland.cc |
diff --git a/ui/gfx/gl/gl_context_wayland.cc b/ui/gfx/gl/gl_context_wayland.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..746be457d593aa35fa90fde3fe535165bd1c0b78 |
--- /dev/null |
+++ b/ui/gfx/gl/gl_context_wayland.cc |
@@ -0,0 +1,39 @@ |
+// Copyright (c) 2011 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/gfx/gl/gl_context.h" |
+ |
+#include "base/logging.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "ui/gfx/gl/gl_bindings.h" |
+#include "ui/gfx/gl/gl_context_egl.h" |
+#include "ui/gfx/gl/gl_context_stub.h" |
+#include "ui/gfx/gl/gl_implementation.h" |
+#include "ui/gfx/gl/gl_surface_egl.h" |
+#include "ui/gfx/gl/gl_surface_stub.h" |
+ |
jonathan.backer
2011/07/26 14:56:27
Do you need all of these includes? I doubt you nee
|
+namespace gfx { |
+ |
+class GLShareGroup; |
+ |
+scoped_refptr<GLContext> GLContext::CreateGLContext( |
+ GLShareGroup* share_group, |
+ GLSurface* compatible_surface) { |
+ switch (GetGLImplementation()) { |
+ case kGLImplementationEGLGLES2: { |
+ scoped_refptr<GLContext> context(new GLContextEGL(share_group)); |
+ if (!context->Initialize(compatible_surface)) |
+ return NULL; |
+ |
+ return context; |
+ } |
+ case kGLImplementationMockGL: |
+ return new GLContextStub; |
+ default: |
+ NOTREACHED(); |
+ return NULL; |
+ } |
+} |
+ |
+} // namespace gfx |