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 |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace gfx { | 21 namespace gfx { |
22 | 22 |
23 // Interface for EGL surface. | 23 // Interface for EGL surface. |
24 class GL_EXPORT GLSurfaceEGL : public GLSurface { | 24 class GL_EXPORT GLSurfaceEGL : public GLSurface { |
25 public: | 25 public: |
26 GLSurfaceEGL(); | 26 GLSurfaceEGL(); |
27 | 27 |
28 // Implement GLSurface. | 28 // Implement GLSurface. |
29 virtual EGLDisplay GetDisplay() OVERRIDE; | 29 virtual EGLDisplay GetDisplay() OVERRIDE; |
30 | 30 |
31 static bool InitializeOneOff(); | 31 static bool InitializeOneOff(EGLNativeDisplayType native_display); |
32 static EGLDisplay GetHardwareDisplay(); | 32 static EGLDisplay GetHardwareDisplay(); |
33 static EGLNativeDisplayType GetNativeDisplay(); | 33 static EGLNativeDisplayType GetNativeDisplay(); |
34 | 34 |
35 // These aren't particularly tied to surfaces, but since we already | 35 // These aren't particularly tied to surfaces, but since we already |
36 // have the static InitializeOneOff here, it's easiest to reuse its | 36 // have the static InitializeOneOff here, it's easiest to reuse its |
37 // initialization guards. | 37 // initialization guards. |
38 static const char* GetEGLExtensions(); | 38 static const char* GetEGLExtensions(); |
39 static bool HasEGLExtension(const char* name); | 39 static bool HasEGLExtension(const char* name); |
40 static bool IsCreateContextRobustnessSupported(); | 40 static bool IsCreateContextRobustnessSupported(); |
| 41 static bool IsEGLSurfacelessContextSupported(); |
41 | 42 |
42 protected: | 43 protected: |
43 virtual ~GLSurfaceEGL(); | 44 virtual ~GLSurfaceEGL(); |
44 | 45 |
45 private: | 46 private: |
46 DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGL); | 47 DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGL); |
47 }; | 48 }; |
48 | 49 |
49 // Encapsulates an EGL surface bound to a view. | 50 // Encapsulates an EGL surface bound to a view. |
50 class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL { | 51 class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 virtual ~SurfacelessEGL(); | 134 virtual ~SurfacelessEGL(); |
134 | 135 |
135 private: | 136 private: |
136 gfx::Size size_; | 137 gfx::Size size_; |
137 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); | 138 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); |
138 }; | 139 }; |
139 | 140 |
140 } // namespace gfx | 141 } // namespace gfx |
141 | 142 |
142 #endif // UI_GL_GL_SURFACE_EGL_H_ | 143 #endif // UI_GL_GL_SURFACE_EGL_H_ |
OLD | NEW |