| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_GFX_GL_GL_SURFACE_GLX_H_ | 5 #ifndef UI_GFX_GL_GL_SURFACE_GLX_H_ |
| 6 #define UI_GFX_GL_GL_SURFACE_GLX_H_ | 6 #define UI_GFX_GL_GL_SURFACE_GLX_H_ |
| 7 | 7 |
| 8 #include "ui/gfx/gl/gl_surface.h" | 8 #include "ui/gfx/gl/gl_surface.h" |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // a GLX drawable. | 36 // a GLX drawable. |
| 37 virtual void* GetConfig() = 0; | 37 virtual void* GetConfig() = 0; |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 DISALLOW_COPY_AND_ASSIGN(GLSurfaceGLX); | 40 DISALLOW_COPY_AND_ASSIGN(GLSurfaceGLX); |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 // A surface used to render to a view. | 43 // A surface used to render to a view. |
| 44 class GL_EXPORT NativeViewGLSurfaceGLX : public GLSurfaceGLX { | 44 class GL_EXPORT NativeViewGLSurfaceGLX : public GLSurfaceGLX { |
| 45 public: | 45 public: |
| 46 explicit NativeViewGLSurfaceGLX(gfx::PluginWindowHandle window); | 46 explicit NativeViewGLSurfaceGLX(gfx::AcceleratedWidget window); |
| 47 virtual ~NativeViewGLSurfaceGLX(); | 47 virtual ~NativeViewGLSurfaceGLX(); |
| 48 | 48 |
| 49 // Implement GLSurfaceGLX. | 49 // Implement GLSurfaceGLX. |
| 50 virtual bool Initialize() OVERRIDE; | 50 virtual bool Initialize() OVERRIDE; |
| 51 virtual void Destroy() OVERRIDE; | 51 virtual void Destroy() OVERRIDE; |
| 52 virtual bool IsOffscreen() OVERRIDE; | 52 virtual bool IsOffscreen() OVERRIDE; |
| 53 virtual bool SwapBuffers() OVERRIDE; | 53 virtual bool SwapBuffers() OVERRIDE; |
| 54 virtual gfx::Size GetSize() OVERRIDE; | 54 virtual gfx::Size GetSize() OVERRIDE; |
| 55 virtual void* GetHandle() OVERRIDE; | 55 virtual void* GetHandle() OVERRIDE; |
| 56 virtual std::string GetExtensions() OVERRIDE; | 56 virtual std::string GetExtensions() OVERRIDE; |
| 57 virtual void* GetConfig() OVERRIDE; | 57 virtual void* GetConfig() OVERRIDE; |
| 58 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; | 58 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; |
| 59 | 59 |
| 60 protected: | 60 protected: |
| 61 NativeViewGLSurfaceGLX(); | 61 NativeViewGLSurfaceGLX(); |
| 62 | 62 |
| 63 gfx::PluginWindowHandle window_; | 63 gfx::AcceleratedWidget window_; |
| 64 | 64 |
| 65 private: | 65 private: |
| 66 void* config_; | 66 void* config_; |
| 67 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceGLX); | 67 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceGLX); |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 // A surface used to render to an offscreen pbuffer. | 70 // A surface used to render to an offscreen pbuffer. |
| 71 class GL_EXPORT PbufferGLSurfaceGLX : public GLSurfaceGLX { | 71 class GL_EXPORT PbufferGLSurfaceGLX : public GLSurfaceGLX { |
| 72 public: | 72 public: |
| 73 explicit PbufferGLSurfaceGLX(const gfx::Size& size); | 73 explicit PbufferGLSurfaceGLX(const gfx::Size& size); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 85 private: | 85 private: |
| 86 gfx::Size size_; | 86 gfx::Size size_; |
| 87 void* config_; | 87 void* config_; |
| 88 XID pbuffer_; | 88 XID pbuffer_; |
| 89 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX); | 89 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 } // namespace gfx | 92 } // namespace gfx |
| 93 | 93 |
| 94 #endif // UI_GFX_GL_GL_SURFACE_GLX_H_ | 94 #endif // UI_GFX_GL_GL_SURFACE_GLX_H_ |
| OLD | NEW |