Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(480)

Unified Diff: ui/gfx/gl/gl_context_wayland.cc

Issue 7467007: Adding Wayland support for ui/gfx (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Replaced the way WaylandDisplay is being retrieved Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698