| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 public: | 55 public: |
| 56 NativeViewGLSurfaceGLX( | 56 NativeViewGLSurfaceGLX( |
| 57 gfx::AcceleratedWidget window, | 57 gfx::AcceleratedWidget window, |
| 58 const gfx::SurfaceConfiguration& requested_configuration); | 58 const gfx::SurfaceConfiguration& requested_configuration); |
| 59 | 59 |
| 60 // Implement GLSurfaceGLX. | 60 // Implement GLSurfaceGLX. |
| 61 bool Initialize() override; | 61 bool Initialize() override; |
| 62 void Destroy() override; | 62 void Destroy() override; |
| 63 bool Resize(const gfx::Size& size) override; | 63 bool Resize(const gfx::Size& size) override; |
| 64 bool IsOffscreen() override; | 64 bool IsOffscreen() override; |
| 65 bool SwapBuffers() override; | 65 gfx::SwapResult SwapBuffers() override; |
| 66 gfx::Size GetSize() override; | 66 gfx::Size GetSize() override; |
| 67 void* GetHandle() override; | 67 void* GetHandle() override; |
| 68 bool SupportsPostSubBuffer() override; | 68 bool SupportsPostSubBuffer() override; |
| 69 void* GetConfig() override; | 69 void* GetConfig() override; |
| 70 bool PostSubBuffer(int x, int y, int width, int height) override; | 70 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override; |
| 71 VSyncProvider* GetVSyncProvider() override; | 71 VSyncProvider* GetVSyncProvider() override; |
| 72 | 72 |
| 73 protected: | 73 protected: |
| 74 ~NativeViewGLSurfaceGLX() override; | 74 ~NativeViewGLSurfaceGLX() override; |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 // The handle for the drawable to make current or swap. | 77 // The handle for the drawable to make current or swap. |
| 78 gfx::AcceleratedWidget GetDrawableHandle() const; | 78 gfx::AcceleratedWidget GetDrawableHandle() const; |
| 79 | 79 |
| 80 // PlatformEventDispatcher implementation | 80 // PlatformEventDispatcher implementation |
| (...skipping 18 matching lines...) Expand all Loading... |
| 99 class GL_EXPORT PbufferGLSurfaceGLX : public GLSurfaceGLX { | 99 class GL_EXPORT PbufferGLSurfaceGLX : public GLSurfaceGLX { |
| 100 public: | 100 public: |
| 101 PbufferGLSurfaceGLX( | 101 PbufferGLSurfaceGLX( |
| 102 const gfx::Size& size, | 102 const gfx::Size& size, |
| 103 const gfx::SurfaceConfiguration& requested_configuration); | 103 const gfx::SurfaceConfiguration& requested_configuration); |
| 104 | 104 |
| 105 // Implement GLSurfaceGLX. | 105 // Implement GLSurfaceGLX. |
| 106 bool Initialize() override; | 106 bool Initialize() override; |
| 107 void Destroy() override; | 107 void Destroy() override; |
| 108 bool IsOffscreen() override; | 108 bool IsOffscreen() override; |
| 109 bool SwapBuffers() override; | 109 gfx::SwapResult SwapBuffers() override; |
| 110 gfx::Size GetSize() override; | 110 gfx::Size GetSize() override; |
| 111 void* GetHandle() override; | 111 void* GetHandle() override; |
| 112 void* GetConfig() override; | 112 void* GetConfig() override; |
| 113 | 113 |
| 114 protected: | 114 protected: |
| 115 ~PbufferGLSurfaceGLX() override; | 115 ~PbufferGLSurfaceGLX() override; |
| 116 | 116 |
| 117 private: | 117 private: |
| 118 gfx::Size size_; | 118 gfx::Size size_; |
| 119 void* config_; | 119 void* config_; |
| 120 XID pbuffer_; | 120 XID pbuffer_; |
| 121 | 121 |
| 122 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX); | 122 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX); |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 } // namespace gfx | 125 } // namespace gfx |
| 126 | 126 |
| 127 #endif // UI_GL_GL_SURFACE_GLX_H_ | 127 #endif // UI_GL_GL_SURFACE_GLX_H_ |
| OLD | NEW |