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_GFX_GL_GL_SURFACE_EGL_H_ | 5 #ifndef UI_GFX_GL_GL_SURFACE_EGL_H_ |
6 #define UI_GFX_GL_GL_SURFACE_EGL_H_ | 6 #define UI_GFX_GL_GL_SURFACE_EGL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include <windows.h> | 10 #include <windows.h> |
11 #endif | 11 #endif |
12 | 12 |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "ui/gfx/gl/gl_surface.h" | 14 #include "ui/gfx/gl/gl_surface.h" |
15 #include "ui/gfx/native_widget_types.h" | 15 #include "ui/gfx/native_widget_types.h" |
16 #include "ui/gfx/size.h" | 16 #include "ui/gfx/size.h" |
17 | 17 |
18 typedef void* EGLConfig; | 18 typedef void* EGLConfig; |
19 typedef void* EGLDisplay; | 19 typedef void* EGLDisplay; |
20 typedef void* EGLSurface; | 20 typedef void* EGLSurface; |
21 | 21 |
22 #if defined(OS_ANDROID) | 22 #if defined(OS_ANDROID) |
23 typedef void* EGLNativeDisplayType; | 23 typedef void* EGLNativeDisplayType; |
24 #elif defined(OS_WIN) | 24 #elif defined(OS_WIN) |
25 typedef HDC EGLNativeDisplayType; | 25 typedef HDC EGLNativeDisplayType; |
26 #elif defined(USE_WAYLAND) | |
27 typedef struct wl_display* EGLNativeDisplayType; | |
28 #else | 26 #else |
29 typedef struct _XDisplay* EGLNativeDisplayType; | 27 typedef struct _XDisplay* EGLNativeDisplayType; |
30 #endif | 28 #endif |
31 | 29 |
32 namespace gfx { | 30 namespace gfx { |
33 | 31 |
34 // Interface for EGL surface. | 32 // Interface for EGL surface. |
35 class GL_EXPORT GLSurfaceEGL : public GLSurface { | 33 class GL_EXPORT GLSurfaceEGL : public GLSurface { |
36 public: | 34 public: |
37 GLSurfaceEGL(); | 35 GLSurfaceEGL(); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 private: | 97 private: |
100 gfx::Size size_; | 98 gfx::Size size_; |
101 EGLSurface surface_; | 99 EGLSurface surface_; |
102 | 100 |
103 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL); | 101 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL); |
104 }; | 102 }; |
105 | 103 |
106 } // namespace gfx | 104 } // namespace gfx |
107 | 105 |
108 #endif // UI_GFX_GL_GL_SURFACE_EGL_H_ | 106 #endif // UI_GFX_GL_GL_SURFACE_EGL_H_ |
OLD | NEW |