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/command_line.h" |
14 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
15 #include "base/time/time.h" | 16 #include "base/time/time.h" |
16 #include "ui/gfx/geometry/size.h" | 17 #include "ui/gfx/geometry/size.h" |
17 #include "ui/gfx/vsync_provider.h" | 18 #include "ui/gfx/vsync_provider.h" |
18 #include "ui/gl/gl_bindings.h" | 19 #include "ui/gl/gl_bindings.h" |
19 #include "ui/gl/gl_surface.h" | 20 #include "ui/gl/gl_surface.h" |
20 | 21 |
21 namespace gfx { | 22 namespace gfx { |
22 | 23 |
23 // Get default EGL display for GLSurfaceEGL (differs by platform). | 24 // Get default EGL display for GLSurfaceEGL (differs by platform). |
24 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay(); | 25 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay(); |
25 | 26 |
| 27 enum DisplayType { |
| 28 DEFAULT, |
| 29 SWIFT_SHADER, |
| 30 ANGLE_WARP, |
| 31 ANGLE_D3D9, |
| 32 ANGLE_D3D11, |
| 33 ANGLE_OPENGL, |
| 34 ANGLE_OPENGLES, |
| 35 }; |
| 36 |
| 37 GL_EXPORT void GetEGLInitDisplays(bool supports_angle_d3d, |
| 38 bool supports_angle_opengl, |
| 39 const base::CommandLine* command_line, |
| 40 std::vector<DisplayType>* init_displays); |
| 41 |
26 // Interface for EGL surface. | 42 // Interface for EGL surface. |
27 class GL_EXPORT GLSurfaceEGL : public GLSurface { | 43 class GL_EXPORT GLSurfaceEGL : public GLSurface { |
28 public: | 44 public: |
29 GLSurfaceEGL(); | 45 GLSurfaceEGL(); |
30 | 46 |
31 // Implement GLSurface. | 47 // Implement GLSurface. |
32 void DestroyAndTerminateDisplay() override; | 48 void DestroyAndTerminateDisplay() override; |
33 EGLDisplay GetDisplay() override; | 49 EGLDisplay GetDisplay() override; |
34 | 50 |
35 static bool InitializeOneOff(); | 51 static bool InitializeOneOff(); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 ~SurfacelessEGL() override; | 169 ~SurfacelessEGL() override; |
154 | 170 |
155 private: | 171 private: |
156 gfx::Size size_; | 172 gfx::Size size_; |
157 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); | 173 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); |
158 }; | 174 }; |
159 | 175 |
160 } // namespace gfx | 176 } // namespace gfx |
161 | 177 |
162 #endif // UI_GL_GL_SURFACE_EGL_H_ | 178 #endif // UI_GL_GL_SURFACE_EGL_H_ |
OLD | NEW |