OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "ui/gl/gl_context_egl.h" | 5 #include "ui/gl/gl_context_egl.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/trace_event/trace_event.h" | 11 #include "base/trace_event/trace_event.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "third_party/khronos/EGL/egl.h" | 13 #include "third_party/khronos/EGL/egl.h" |
14 #include "third_party/khronos/EGL/eglext.h" | 14 #include "third_party/khronos/EGL/eglext.h" |
15 #include "ui/gl/egl_util.h" | 15 #include "ui/gl/egl_util.h" |
16 #include "ui/gl/gl_bindings.h" | 16 #include "ui/gl/gl_bindings.h" |
17 #include "ui/gl/gl_surface_egl.h" | 17 #include "ui/gl/gl_surface_egl.h" |
18 | 18 |
19 #if defined(USE_X11) | 19 #if defined(USE_X11) |
20 extern "C" { | 20 extern "C" { |
21 #include <X11/Xlib.h> | 21 #include <X11/Xlib.h> |
22 } | 22 } |
23 #endif | 23 #endif |
24 | 24 |
25 using ui::GetLastEGLErrorString; | 25 using ui::GetLastEGLErrorString; |
26 | 26 |
27 namespace gfx { | 27 namespace gl { |
28 | 28 |
29 GLContextEGL::GLContextEGL(GLShareGroup* share_group) | 29 GLContextEGL::GLContextEGL(GLShareGroup* share_group) |
30 : GLContextReal(share_group), | 30 : GLContextReal(share_group), |
31 context_(nullptr), | 31 context_(nullptr), |
32 display_(nullptr), | 32 display_(nullptr), |
33 config_(nullptr), | 33 config_(nullptr), |
34 unbind_fbo_on_makecurrent_(false), | 34 unbind_fbo_on_makecurrent_(false), |
35 swap_interval_(1) { | 35 swap_interval_(1) { |
36 } | 36 } |
37 | 37 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 } | 217 } |
218 | 218 |
219 bool GLContextEGL::WasAllocatedUsingRobustnessExtension() { | 219 bool GLContextEGL::WasAllocatedUsingRobustnessExtension() { |
220 return GLSurfaceEGL::IsCreateContextRobustnessSupported(); | 220 return GLSurfaceEGL::IsCreateContextRobustnessSupported(); |
221 } | 221 } |
222 | 222 |
223 GLContextEGL::~GLContextEGL() { | 223 GLContextEGL::~GLContextEGL() { |
224 Destroy(); | 224 Destroy(); |
225 } | 225 } |
226 | 226 |
227 } // namespace gfx | 227 } // namespace gl |
OLD | NEW |