Chromium Code Reviews| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "ui/base/x/x11_util.h" | 10 #include "ui/base/x/x11_util.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 virtual ~PbufferGLSurfaceGLX(); | 90 virtual ~PbufferGLSurfaceGLX(); |
| 91 | 91 |
| 92 private: | 92 private: |
| 93 gfx::Size size_; | 93 gfx::Size size_; |
| 94 void* config_; | 94 void* config_; |
| 95 XID pbuffer_; | 95 XID pbuffer_; |
| 96 | 96 |
| 97 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX); | 97 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX); |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 // A surface used to render to an offscreen pixmap. | |
| 101 class GL_EXPORT PixmapGLSurfaceGLX : public GLSurfaceGLX { | |
|
piman
2012/06/12 23:15:38
Do you really need to make this structure a GLSurf
| |
| 102 public: | |
| 103 explicit PixmapGLSurfaceGLX(XID pixmap); | |
| 104 | |
| 105 // Implement GLSurfaceGLX. | |
| 106 virtual bool Initialize() OVERRIDE; | |
| 107 virtual void Destroy() OVERRIDE; | |
| 108 virtual bool IsOffscreen() OVERRIDE; | |
| 109 virtual bool SwapBuffers() OVERRIDE; | |
| 110 virtual gfx::Size GetSize() OVERRIDE; | |
| 111 virtual void* GetHandle() OVERRIDE; | |
| 112 virtual void* GetConfig() OVERRIDE; | |
| 113 virtual void* GetShareHandle() OVERRIDE; | |
| 114 | |
| 115 protected: | |
| 116 virtual ~PixmapGLSurfaceGLX(); | |
| 117 | |
| 118 private: | |
| 119 void* config_; | |
| 120 XID pixmap_; | |
| 121 XID glx_pixmap_; | |
| 122 gfx::Size size_; | |
| 123 | |
| 124 DISALLOW_COPY_AND_ASSIGN(PixmapGLSurfaceGLX); | |
| 125 }; | |
| 126 | |
| 100 } // namespace gfx | 127 } // namespace gfx |
| 101 | 128 |
| 102 #endif // UI_GL_GL_SURFACE_GLX_H_ | 129 #endif // UI_GL_GL_SURFACE_GLX_H_ |
| OLD | NEW |