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/time.h" | 15 #include "base/time/time.h" |
16 #include "ui/gfx/size.h" | 16 #include "ui/gfx/size.h" |
17 #include "ui/gfx/vsync_provider.h" | 17 #include "ui/gfx/vsync_provider.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 | 20 |
21 namespace gfx { | 21 namespace gfx { |
22 | 22 |
23 // Get default EGL display for GLSurfaceEGL (differs by platform). | 23 // Get default EGL display for GLSurfaceEGL (differs by platform). |
24 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay(); | 24 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay(); |
| 25 #if defined(OS_WIN) |
| 26 // Windows must call eglGetPlatformDisplayEXT to get ANGLE to enable WARP, so |
| 27 // we define additional data helpers to provide values for the additional |
| 28 // required arguments for that method. |
| 29 const EGLint* GetPlatformDefaultEGLNativeDisplayAttributes(); |
| 30 const EGLenum GetPlatformDefaultEGLNativePlatform(); |
| 31 #endif |
25 | 32 |
26 // Interface for EGL surface. | 33 // Interface for EGL surface. |
27 class GL_EXPORT GLSurfaceEGL : public GLSurface { | 34 class GL_EXPORT GLSurfaceEGL : public GLSurface { |
28 public: | 35 public: |
29 GLSurfaceEGL(); | 36 GLSurfaceEGL(); |
30 | 37 |
31 // Implement GLSurface. | 38 // Implement GLSurface. |
32 virtual EGLDisplay GetDisplay() OVERRIDE; | 39 virtual EGLDisplay GetDisplay() OVERRIDE; |
33 | 40 |
34 static bool InitializeOneOff(); | 41 static bool InitializeOneOff(); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 virtual ~SurfacelessEGL(); | 144 virtual ~SurfacelessEGL(); |
138 | 145 |
139 private: | 146 private: |
140 gfx::Size size_; | 147 gfx::Size size_; |
141 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); | 148 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); |
142 }; | 149 }; |
143 | 150 |
144 } // namespace gfx | 151 } // namespace gfx |
145 | 152 |
146 #endif // UI_GL_GL_SURFACE_EGL_H_ | 153 #endif // UI_GL_GL_SURFACE_EGL_H_ |
OLD | NEW |