| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ozone/platform/x11/x11_surface_factory.h" | 5 #include "ui/ozone/platform/x11/x11_surface_factory.h" |
| 6 | 6 |
| 7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
| 8 | 8 |
| 9 #include "third_party/khronos/EGL/egl.h" | 9 #include "third_party/khronos/EGL/egl.h" |
| 10 #include "ui/gfx/x/x11_types.h" | 10 #include "ui/gfx/x/x11_types.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 gl::GLImplementation implementation, | 140 gl::GLImplementation implementation, |
| 141 const gfx::Size& size) { | 141 const gfx::Size& size) { |
| 142 if (implementation != gl::kGLImplementationEGLGLES2) { | 142 if (implementation != gl::kGLImplementationEGLGLES2) { |
| 143 NOTREACHED(); | 143 NOTREACHED(); |
| 144 return nullptr; | 144 return nullptr; |
| 145 } | 145 } |
| 146 | 146 |
| 147 return gl::InitializeGLSurface(new gl::PbufferGLSurfaceEGL(size)); | 147 return gl::InitializeGLSurface(new gl::PbufferGLSurfaceEGL(size)); |
| 148 } | 148 } |
| 149 | 149 |
| 150 bool X11SurfaceFactory::LoadEGLGLES2Bindings( | 150 bool X11SurfaceFactory::LoadEGLGLES2Bindings() { |
| 151 AddGLLibraryCallback add_gl_library, | 151 return LoadDefaultEGLGLES2Bindings(); |
| 152 SetGLGetProcAddressProcCallback set_gl_get_proc_address) { | |
| 153 return LoadDefaultEGLGLES2Bindings(add_gl_library, set_gl_get_proc_address); | |
| 154 } | 152 } |
| 155 | 153 |
| 156 intptr_t X11SurfaceFactory::GetNativeDisplay() { | 154 intptr_t X11SurfaceFactory::GetNativeDisplay() { |
| 157 return reinterpret_cast<intptr_t>(gfx::GetXDisplay()); | 155 return reinterpret_cast<intptr_t>(gfx::GetXDisplay()); |
| 158 } | 156 } |
| 159 | 157 |
| 160 } // namespace ui | 158 } // namespace ui |
| OLD | NEW |