| 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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 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 static bool IsTextureFromPixmapSupported(); |
| 31 static bool IsOMLSyncControlSupported(); |
| 31 | 32 |
| 32 virtual void* GetDisplay() OVERRIDE; | 33 virtual void* GetDisplay() OVERRIDE; |
| 33 | 34 |
| 34 // Get the FB config that the surface was created with or NULL if it is not | 35 // Get the FB config that the surface was created with or NULL if it is not |
| 35 // a GLX drawable. | 36 // a GLX drawable. |
| 36 virtual void* GetConfig() = 0; | 37 virtual void* GetConfig() = 0; |
| 37 | 38 |
| 38 protected: | 39 protected: |
| 39 virtual ~GLSurfaceGLX(); | 40 virtual ~GLSurfaceGLX(); |
| 40 | 41 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 51 virtual bool Initialize() OVERRIDE; | 52 virtual bool Initialize() OVERRIDE; |
| 52 virtual void Destroy() OVERRIDE; | 53 virtual void Destroy() OVERRIDE; |
| 53 virtual bool Resize(const gfx::Size& size) OVERRIDE; | 54 virtual bool Resize(const gfx::Size& size) OVERRIDE; |
| 54 virtual bool IsOffscreen() OVERRIDE; | 55 virtual bool IsOffscreen() OVERRIDE; |
| 55 virtual bool SwapBuffers() OVERRIDE; | 56 virtual bool SwapBuffers() OVERRIDE; |
| 56 virtual gfx::Size GetSize() OVERRIDE; | 57 virtual gfx::Size GetSize() OVERRIDE; |
| 57 virtual void* GetHandle() OVERRIDE; | 58 virtual void* GetHandle() OVERRIDE; |
| 58 virtual std::string GetExtensions() OVERRIDE; | 59 virtual std::string GetExtensions() OVERRIDE; |
| 59 virtual void* GetConfig() OVERRIDE; | 60 virtual void* GetConfig() OVERRIDE; |
| 60 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; | 61 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; |
| 62 virtual bool GetVSyncParameters(base::TimeTicks* timebase, |
| 63 base::TimeDelta* interval) OVERRIDE; |
| 61 | 64 |
| 62 protected: | 65 protected: |
| 63 NativeViewGLSurfaceGLX(); | 66 NativeViewGLSurfaceGLX(); |
| 64 virtual ~NativeViewGLSurfaceGLX(); | 67 virtual ~NativeViewGLSurfaceGLX(); |
| 65 | 68 |
| 66 gfx::AcceleratedWidget window_; | 69 gfx::AcceleratedWidget window_; |
| 67 | 70 |
| 68 private: | 71 private: |
| 69 void* config_; | 72 void* config_; |
| 70 gfx::Size size_; | 73 gfx::Size size_; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 93 gfx::Size size_; | 96 gfx::Size size_; |
| 94 void* config_; | 97 void* config_; |
| 95 XID pbuffer_; | 98 XID pbuffer_; |
| 96 | 99 |
| 97 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX); | 100 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX); |
| 98 }; | 101 }; |
| 99 | 102 |
| 100 } // namespace gfx | 103 } // namespace gfx |
| 101 | 104 |
| 102 #endif // UI_GL_GL_SURFACE_GLX_H_ | 105 #endif // UI_GL_GL_SURFACE_GLX_H_ |
| OLD | NEW |