| 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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 public: | 21 public: |
| 22 GLSurfaceGLX(); | 22 GLSurfaceGLX(); |
| 23 | 23 |
| 24 static bool InitializeOneOff(); | 24 static bool InitializeOneOff(); |
| 25 | 25 |
| 26 // These aren't particularly tied to surfaces, but since we already | 26 // These aren't particularly tied to surfaces, but since we already |
| 27 // have the static InitializeOneOff here, it's easiest to reuse its | 27 // have the static InitializeOneOff here, it's easiest to reuse its |
| 28 // initialization guards. | 28 // initialization guards. |
| 29 static const char* GetGLXExtensions(); | 29 static const char* GetGLXExtensions(); |
| 30 static bool HasGLXExtension(const char* name); | 30 static bool HasGLXExtension(const char* name); |
| 31 static bool IsCreateContextSupported(); |
| 31 static bool IsCreateContextRobustnessSupported(); | 32 static bool IsCreateContextRobustnessSupported(); |
| 32 static bool IsTextureFromPixmapSupported(); | 33 static bool IsTextureFromPixmapSupported(); |
| 33 static bool IsOMLSyncControlSupported(); | 34 static bool IsOMLSyncControlSupported(); |
| 34 | 35 |
| 35 virtual void* GetDisplay() OVERRIDE; | 36 virtual void* GetDisplay() OVERRIDE; |
| 36 | 37 |
| 37 // Get the FB config that the surface was created with or NULL if it is not | 38 // Get the FB config that the surface was created with or NULL if it is not |
| 38 // a GLX drawable. | 39 // a GLX drawable. |
| 39 virtual void* GetConfig() = 0; | 40 virtual void* GetConfig() = 0; |
| 40 | 41 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 69 | 70 |
| 70 virtual void GetVSyncParameters( | 71 virtual void GetVSyncParameters( |
| 71 const GLSurface::UpdateVSyncCallback& callback) = 0; | 72 const GLSurface::UpdateVSyncCallback& callback) = 0; |
| 72 }; | 73 }; |
| 73 | 74 |
| 74 protected: | 75 protected: |
| 75 NativeViewGLSurfaceGLX(); | 76 NativeViewGLSurfaceGLX(); |
| 76 virtual ~NativeViewGLSurfaceGLX(); | 77 virtual ~NativeViewGLSurfaceGLX(); |
| 77 | 78 |
| 78 gfx::AcceleratedWidget window_; | 79 gfx::AcceleratedWidget window_; |
| 80 XID glx_window_; |
| 79 | 81 |
| 80 private: | 82 private: |
| 81 void* config_; | 83 void* config_; |
| 82 gfx::Size size_; | 84 gfx::Size size_; |
| 83 | 85 |
| 84 scoped_ptr<VSyncProvider> vsync_provider_; | 86 scoped_ptr<VSyncProvider> vsync_provider_; |
| 85 | 87 |
| 86 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceGLX); | 88 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceGLX); |
| 87 }; | 89 }; |
| 88 | 90 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 107 gfx::Size size_; | 109 gfx::Size size_; |
| 108 void* config_; | 110 void* config_; |
| 109 XID pbuffer_; | 111 XID pbuffer_; |
| 110 | 112 |
| 111 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX); | 113 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX); |
| 112 }; | 114 }; |
| 113 | 115 |
| 114 } // namespace gfx | 116 } // namespace gfx |
| 115 | 117 |
| 116 #endif // UI_GL_GL_SURFACE_GLX_H_ | 118 #endif // UI_GL_GL_SURFACE_GLX_H_ |
| OLD | NEW |