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_CGL_H_ | 5 #ifndef UI_GFX_GL_GL_SURFACE_CGL_H_ |
6 #define UI_GFX_GL_GL_SURFACE_CGL_H_ | 6 #define UI_GFX_GL_GL_SURFACE_CGL_H_ |
7 | 7 |
8 #include "ui/gfx/gl/gl_surface.h" | 8 #include "ui/gfx/gl/gl_surface.h" |
9 #include "ui/gfx/size.h" | 9 #include "ui/gfx/size.h" |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 DISALLOW_COPY_AND_ASSIGN(GLSurfaceCGL); | 23 DISALLOW_COPY_AND_ASSIGN(GLSurfaceCGL); |
24 }; | 24 }; |
25 | 25 |
26 // A surface used to render to an offscreen pbuffer. | 26 // A surface used to render to an offscreen pbuffer. |
27 class PbufferGLSurfaceCGL : public GLSurfaceCGL { | 27 class PbufferGLSurfaceCGL : public GLSurfaceCGL { |
28 public: | 28 public: |
29 explicit PbufferGLSurfaceCGL(const gfx::Size& size); | 29 explicit PbufferGLSurfaceCGL(const gfx::Size& size); |
30 virtual ~PbufferGLSurfaceCGL(); | 30 virtual ~PbufferGLSurfaceCGL(); |
31 | 31 |
32 // Implement GLSurface. | 32 // Implement GLSurface. |
33 virtual bool Initialize(); | 33 virtual bool Initialize() OVERRIDE; |
34 virtual void Destroy(); | 34 virtual void Destroy() OVERRIDE; |
35 virtual bool IsOffscreen(); | 35 virtual bool IsOffscreen() OVERRIDE; |
36 virtual bool SwapBuffers(); | 36 virtual bool SwapBuffers() OVERRIDE; |
37 virtual gfx::Size GetSize(); | 37 virtual gfx::Size GetSize() OVERRIDE; |
38 virtual void* GetHandle(); | 38 virtual void* GetHandle() OVERRIDE; |
39 | 39 |
40 private: | 40 private: |
41 gfx::Size size_; | 41 gfx::Size size_; |
42 void* pbuffer_; | 42 void* pbuffer_; |
43 | 43 |
44 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceCGL); | 44 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceCGL); |
45 }; | 45 }; |
46 | 46 |
47 } // namespace gfx | 47 } // namespace gfx |
48 | 48 |
49 #endif // UI_GFX_GL_GL_SURFACE_CGL_H_ | 49 #endif // UI_GFX_GL_GL_SURFACE_CGL_H_ |
OLD | NEW |