OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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_surface_egl_x11.h" | 5 #include "ui/gl/gl_surface_egl_x11.h" |
6 | 6 |
7 #include "ui/events/platform/platform_event_source.h" | 7 #include "ui/events/platform/platform_event_source.h" |
| 8 #include "ui/gfx/x/x11_types.h" |
8 #include "ui/gl/egl_util.h" | 9 #include "ui/gl/egl_util.h" |
9 | 10 |
10 extern "C" { | 11 extern "C" { |
11 #include <X11/Xlib.h> | 12 #include <X11/Xlib.h> |
12 } | 13 } |
13 | 14 |
14 using ui::GetLastEGLErrorString; | 15 using ui::GetLastEGLErrorString; |
15 using ui::PlatformEvent; | 16 using ui::PlatformEvent; |
16 using ui::PlatformEventSource; | 17 using ui::PlatformEventSource; |
17 | 18 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 Display* x11_display = GetNativeDisplay(); | 171 Display* x11_display = GetNativeDisplay(); |
171 XSendEvent(x11_display, parent_window_, False, ExposureMask, &x_event); | 172 XSendEvent(x11_display, parent_window_, False, ExposureMask, &x_event); |
172 XFlush(x11_display); | 173 XFlush(x11_display); |
173 return ui::POST_DISPATCH_STOP_PROPAGATION; | 174 return ui::POST_DISPATCH_STOP_PROPAGATION; |
174 } | 175 } |
175 | 176 |
176 NativeViewGLSurfaceEGLX11::~NativeViewGLSurfaceEGLX11() { | 177 NativeViewGLSurfaceEGLX11::~NativeViewGLSurfaceEGLX11() { |
177 Destroy(); | 178 Destroy(); |
178 } | 179 } |
179 | 180 |
| 181 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { |
| 182 return gfx::GetXDisplay(); |
| 183 } |
| 184 |
180 } // namespace gl | 185 } // namespace gl |
OLD | NEW |