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 #ifndef UI_GL_GL_SURFACE_EGL_H_ | 5 #ifndef UI_GL_GL_SURFACE_EGL_H_ |
6 #define UI_GL_GL_SURFACE_EGL_H_ | 6 #define UI_GL_GL_SURFACE_EGL_H_ |
7 | 7 |
8 #if defined(OS_WIN) | 8 #if defined(OS_WIN) |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif | 10 #endif |
11 | 11 |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/time.h" | 15 #include "base/time.h" |
16 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
17 #include "ui/gfx/size.h" | 17 #include "ui/gfx/size.h" |
18 #include "ui/gl/gl_bindings.h" | 18 #include "ui/gl/gl_bindings.h" |
19 #include "ui/gl/gl_surface.h" | 19 #include "ui/gl/gl_surface.h" |
20 #include "ui/gl/vsync_provider.h" | 20 #include "ui/gl/vsync_provider.h" |
21 | 21 |
| 22 #if defined(USE_WAYLAND) |
| 23 struct wl_surface; |
| 24 struct wl_egl_window; |
| 25 #endif |
| 26 |
22 namespace gfx { | 27 namespace gfx { |
23 | 28 |
24 // Interface for EGL surface. | 29 // Interface for EGL surface. |
25 class GL_EXPORT GLSurfaceEGL : public GLSurface { | 30 class GL_EXPORT GLSurfaceEGL : public GLSurface { |
26 public: | 31 public: |
27 GLSurfaceEGL(); | 32 GLSurfaceEGL(); |
28 | 33 |
29 // Implement GLSurface. | 34 // Implement GLSurface. |
30 virtual EGLDisplay GetDisplay() OVERRIDE; | 35 virtual EGLDisplay GetDisplay() OVERRIDE; |
31 | 36 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 virtual bool Resize(const gfx::Size& size) OVERRIDE; | 107 virtual bool Resize(const gfx::Size& size) OVERRIDE; |
103 virtual EGLSurface GetHandle() OVERRIDE; | 108 virtual EGLSurface GetHandle() OVERRIDE; |
104 virtual void* GetShareHandle() OVERRIDE; | 109 virtual void* GetShareHandle() OVERRIDE; |
105 | 110 |
106 protected: | 111 protected: |
107 virtual ~PbufferGLSurfaceEGL(); | 112 virtual ~PbufferGLSurfaceEGL(); |
108 | 113 |
109 private: | 114 private: |
110 gfx::Size size_; | 115 gfx::Size size_; |
111 EGLSurface surface_; | 116 EGLSurface surface_; |
| 117 #if defined(USE_WAYLAND) |
| 118 wl_surface *wsurf_; |
| 119 wl_egl_window *wwindow_; |
| 120 #endif |
112 | 121 |
113 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL); | 122 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL); |
114 }; | 123 }; |
115 | 124 |
116 } // namespace gfx | 125 } // namespace gfx |
117 | 126 |
118 #endif // UI_GL_GL_SURFACE_EGL_H_ | 127 #endif // UI_GL_GL_SURFACE_EGL_H_ |
OLD | NEW |