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_GLX_H_ | 5 #ifndef UI_GL_GL_SURFACE_GLX_H_ |
6 #define UI_GL_GL_SURFACE_GLX_H_ | 6 #define UI_GL_GL_SURFACE_GLX_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "ui/events/platform/platform_event_dispatcher.h" | 11 #include "ui/events/platform/platform_event_dispatcher.h" |
12 #include "ui/gfx/geometry/size.h" | 12 #include "ui/gfx/geometry/size.h" |
13 #include "ui/gfx/native_widget_types.h" | 13 #include "ui/gfx/native_widget_types.h" |
14 #include "ui/gfx/vsync_provider.h" | 14 #include "ui/gfx/vsync_provider.h" |
15 #include "ui/gfx/x/x11_types.h" | 15 #include "ui/gfx/x/x11_types.h" |
16 #include "ui/gl/gl_export.h" | 16 #include "ui/gl/gl_export.h" |
17 #include "ui/gl/gl_surface.h" | 17 #include "ui/gl/gl_surface.h" |
18 | 18 |
19 namespace gfx { | 19 namespace gfx { |
20 | 20 |
21 // Base class for GLX surfaces. | 21 // Base class for GLX surfaces. |
22 class GL_EXPORT GLSurfaceGLX : public GLSurface { | 22 class GL_EXPORT GLSurfaceGLX : public GLSurface { |
23 public: | 23 public: |
24 GLSurfaceGLX(); | 24 explicit GLSurfaceGLX( |
| 25 const gfx::SurfaceConfiguration requested_configuration); |
25 | 26 |
26 static bool InitializeOneOff(); | 27 static bool InitializeOneOff(); |
27 | 28 |
28 // These aren't particularly tied to surfaces, but since we already | 29 // These aren't particularly tied to surfaces, but since we already |
29 // have the static InitializeOneOff here, it's easiest to reuse its | 30 // have the static InitializeOneOff here, it's easiest to reuse its |
30 // initialization guards. | 31 // initialization guards. |
31 static const char* GetGLXExtensions(); | 32 static const char* GetGLXExtensions(); |
32 static bool HasGLXExtension(const char* name); | 33 static bool HasGLXExtension(const char* name); |
33 static bool IsCreateContextSupported(); | 34 static bool IsCreateContextSupported(); |
34 static bool IsCreateContextRobustnessSupported(); | 35 static bool IsCreateContextRobustnessSupported(); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 gfx::Size size_; | 114 gfx::Size size_; |
114 void* config_; | 115 void* config_; |
115 XID pbuffer_; | 116 XID pbuffer_; |
116 | 117 |
117 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX); | 118 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX); |
118 }; | 119 }; |
119 | 120 |
120 } // namespace gfx | 121 } // namespace gfx |
121 | 122 |
122 #endif // UI_GL_GL_SURFACE_GLX_H_ | 123 #endif // UI_GL_GL_SURFACE_GLX_H_ |
OLD | NEW |