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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/gfx/gl/gl_context.h"
6
7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h"
9 #include "ui/gfx/gl/gl_bindings.h"
10 #include "ui/gfx/gl/gl_context_egl.h"
11 #include "ui/gfx/gl/gl_context_stub.h"
12 #include "ui/gfx/gl/gl_implementation.h"
13 #include "ui/gfx/gl/gl_surface_egl.h"
14 #include "ui/gfx/gl/gl_surface_stub.h"
15
jonathan.backer 2011/07/26 14:56:27 Do you need all of these includes? I doubt you nee
16 namespace gfx {
17
18 class GLShareGroup;
19
20 scoped_refptr<GLContext> GLContext::CreateGLContext(
21 GLShareGroup* share_group,
22 GLSurface* compatible_surface) {
23 switch (GetGLImplementation()) {
24 case kGLImplementationEGLGLES2: {
25 scoped_refptr<GLContext> context(new GLContextEGL(share_group));
26 if (!context->Initialize(compatible_surface))
27 return NULL;
28
29 return context;
30 }
31 case kGLImplementationMockGL:
32 return new GLContextStub;
33 default:
34 NOTREACHED();
35 return NULL;
36 }
37 }
38
39 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698