OLD | NEW |
---|---|
(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/ref_counted.h" | |
9 #include "ui/gfx/gl/gl_bindings.h" | |
10 #include "ui/gfx/gl/gl_context_egl.h" | |
11 | |
12 namespace gfx { | |
13 | |
14 // static | |
15 scoped_refptr<GLContext> GLContext::CreateGLContext( | |
16 GLShareGroup* share_group, | |
17 GLSurface* compatible_surface, | |
18 GpuPreference gpu_preference) { | |
19 scoped_refptr<GLContextEGL> context(new GLContextEGL(share_group)); | |
jonathan.backer
2011/11/18 19:33:32
Don't you want to return a GLContextStub if GetGLI
michaelbai
2011/11/21 18:28:58
Done.
| |
20 if (!context->Initialize(compatible_surface, gpu_preference)) | |
21 return NULL; | |
22 return context; | |
23 } | |
24 | |
25 bool GLContext::SupportsDualGpus() { | |
26 return false; | |
27 } | |
28 | |
29 } | |
OLD | NEW |