| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file implements the ViewGLContext and PbufferGLContext classes. | 5 // This file implements the ViewGLContext and PbufferGLContext classes. |
| 6 | 6 |
| 7 #include "app/gfx/gl/gl_context.h" | 7 #include "ui/gfx/gl/gl_context.h" |
| 8 | 8 |
| 9 extern "C" { | 9 extern "C" { |
| 10 #include <X11/Xlib.h> | 10 #include <X11/Xlib.h> |
| 11 } | 11 } |
| 12 | 12 |
| 13 #include <GL/osmesa.h> | 13 #include <GL/osmesa.h> |
| 14 | 14 |
| 15 #include "app/gfx/gl/gl_bindings.h" | |
| 16 #include "app/gfx/gl/gl_context_egl.h" | |
| 17 #include "app/gfx/gl/gl_context_osmesa.h" | |
| 18 #include "app/gfx/gl/gl_context_stub.h" | |
| 19 #include "app/gfx/gl/gl_implementation.h" | |
| 20 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
| 21 #include "base/logging.h" | 16 #include "base/logging.h" |
| 22 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
| 23 #include "ui/base/x/x11_util.h" | 18 #include "ui/base/x/x11_util.h" |
| 19 #include "ui/gfx/gl/gl_bindings.h" |
| 20 #include "ui/gfx/gl/gl_context_egl.h" |
| 21 #include "ui/gfx/gl/gl_context_osmesa.h" |
| 22 #include "ui/gfx/gl/gl_context_stub.h" |
| 23 #include "ui/gfx/gl/gl_implementation.h" |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 Display* GetXDisplayHelper() { | 27 Display* GetXDisplayHelper() { |
| 28 static Display* display = NULL; | 28 static Display* display = NULL; |
| 29 | 29 |
| 30 if (!display) { | 30 if (!display) { |
| 31 display = XOpenDisplay(NULL); | 31 display = XOpenDisplay(NULL); |
| 32 CHECK(display); | 32 CHECK(display); |
| 33 } | 33 } |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 } | 821 } |
| 822 case kGLImplementationMockGL: | 822 case kGLImplementationMockGL: |
| 823 return new StubGLContext; | 823 return new StubGLContext; |
| 824 default: | 824 default: |
| 825 NOTREACHED(); | 825 NOTREACHED(); |
| 826 return NULL; | 826 return NULL; |
| 827 } | 827 } |
| 828 } | 828 } |
| 829 | 829 |
| 830 } // namespace gfx | 830 } // namespace gfx |
| OLD | NEW |