OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_OZONE_PLATFORM_X11_GL_SURFACE_GLX_OZONE_H_ |
| 6 #define UI_OZONE_PLATFORM_X11_GL_SURFACE_GLX_OZONE_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "ui/events/platform/x11/x11_event_source_libevent.h" |
| 10 #include "ui/gl/gl_surface_glx.h" |
| 11 |
| 12 namespace ui { |
| 13 |
| 14 // Ozone specific implementation of GLX surface. Registers as a XEventDispatcher |
| 15 // to handle XEvents. |
| 16 class GLSurfaceGLXOzone : public gl::NativeViewGLSurfaceGLX, |
| 17 public XEventDispatcher { |
| 18 public: |
| 19 explicit GLSurfaceGLXOzone(gfx::AcceleratedWidget window); |
| 20 |
| 21 protected: |
| 22 ~GLSurfaceGLXOzone() override; |
| 23 |
| 24 // NativeViewGLSurfaceGLX: |
| 25 void RegisterEvents() override; |
| 26 void UnregisterEvents() override; |
| 27 |
| 28 // XEventDispatcher: |
| 29 bool DispatchXEvent(XEvent* xevent) override; |
| 30 |
| 31 private: |
| 32 DISALLOW_COPY_AND_ASSIGN(GLSurfaceGLXOzone); |
| 33 }; |
| 34 |
| 35 } // namespace ui |
| 36 |
| 37 #endif // UI_OZONE_PLATFORM_X11_GL_SURFACE_GLX_OZONE_H_ |
OLD | NEW |