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 "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "ui/base/x/x11_util.h" | 9 #include "ui/base/x/x11_util.h" |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
11 #include "ui/gfx/size.h" | 11 #include "ui/gfx/size.h" |
12 #include "ui/gl/gl_export.h" | 12 #include "ui/gl/gl_export.h" |
13 #include "ui/gl/gl_surface.h" | 13 #include "ui/gl/gl_surface.h" |
14 | 14 |
15 namespace gfx { | 15 namespace gfx { |
16 | 16 |
17 // Base class for GLX surfaces. | 17 // Base class for GLX surfaces. |
18 class GL_EXPORT GLSurfaceGLX : public GLSurface { | 18 class GL_EXPORT GLSurfaceGLX : public GLSurface { |
19 public: | 19 public: |
20 GLSurfaceGLX(); | 20 GLSurfaceGLX(); |
21 | 21 |
22 static bool InitializeOneOff(); | 22 static bool InitializeOneOff(); |
23 | 23 |
24 // These aren't particularly tied to surfaces, but since we already | 24 // These aren't particularly tied to surfaces, but since we already |
25 // have the static InitializeOneOff here, it's easiest to reuse its | 25 // have the static InitializeOneOff here, it's easiest to reuse its |
26 // initialization guards. | 26 // initialization guards. |
27 static const char* GetGLXExtensions(); | 27 static const char* GetGLXExtensions(); |
28 static bool HasGLXExtension(const char* name); | 28 static bool HasGLXExtension(const char* name); |
29 static bool IsCreateContextRobustnessSupported(); | 29 static bool IsCreateContextRobustnessSupported(); |
| 30 static bool IsTextureFromPixmapSupported(); |
30 | 31 |
31 virtual void* GetDisplay() OVERRIDE; | 32 virtual void* GetDisplay() OVERRIDE; |
32 | 33 |
33 // Get the FB config that the surface was created with or NULL if it is not | 34 // Get the FB config that the surface was created with or NULL if it is not |
34 // a GLX drawable. | 35 // a GLX drawable. |
35 virtual void* GetConfig() = 0; | 36 virtual void* GetConfig() = 0; |
36 | 37 |
37 protected: | 38 protected: |
38 virtual ~GLSurfaceGLX(); | 39 virtual ~GLSurfaceGLX(); |
39 | 40 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 gfx::Size size_; | 93 gfx::Size size_; |
93 void* config_; | 94 void* config_; |
94 XID pbuffer_; | 95 XID pbuffer_; |
95 | 96 |
96 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX); | 97 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX); |
97 }; | 98 }; |
98 | 99 |
99 } // namespace gfx | 100 } // namespace gfx |
100 | 101 |
101 #endif // UI_GL_GL_SURFACE_GLX_H_ | 102 #endif // UI_GL_GL_SURFACE_GLX_H_ |
OLD | NEW |