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_H_ | 5 #ifndef UI_GFX_GL_GL_SURFACE_H_ |
6 #define UI_GFX_GL_GL_SURFACE_H_ | 6 #define UI_GFX_GL_GL_SURFACE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 class GL_EXPORT GLSurfaceAdapter : public GLSurface { | 109 class GL_EXPORT GLSurfaceAdapter : public GLSurface { |
110 public: | 110 public: |
111 explicit GLSurfaceAdapter(GLSurface* surface); | 111 explicit GLSurfaceAdapter(GLSurface* surface); |
112 virtual ~GLSurfaceAdapter(); | 112 virtual ~GLSurfaceAdapter(); |
113 | 113 |
114 virtual bool Initialize() OVERRIDE; | 114 virtual bool Initialize() OVERRIDE; |
115 virtual void Destroy() OVERRIDE; | 115 virtual void Destroy() OVERRIDE; |
116 virtual bool Resize(const gfx::Size& size) OVERRIDE; | 116 virtual bool Resize(const gfx::Size& size) OVERRIDE; |
117 virtual bool IsOffscreen() OVERRIDE; | 117 virtual bool IsOffscreen() OVERRIDE; |
118 virtual bool SwapBuffers() OVERRIDE; | 118 virtual bool SwapBuffers() OVERRIDE; |
| 119 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; |
| 120 virtual std::string GetExtensions() OVERRIDE; |
119 virtual gfx::Size GetSize() OVERRIDE; | 121 virtual gfx::Size GetSize() OVERRIDE; |
120 virtual void* GetHandle() OVERRIDE; | 122 virtual void* GetHandle() OVERRIDE; |
121 virtual unsigned int GetBackingFrameBufferObject() OVERRIDE; | 123 virtual unsigned int GetBackingFrameBufferObject() OVERRIDE; |
122 virtual bool OnMakeCurrent(GLContext* context) OVERRIDE; | 124 virtual bool OnMakeCurrent(GLContext* context) OVERRIDE; |
123 virtual void* GetShareHandle() OVERRIDE; | 125 virtual void* GetShareHandle() OVERRIDE; |
124 virtual void* GetDisplay() OVERRIDE; | 126 virtual void* GetDisplay() OVERRIDE; |
125 virtual void* GetConfig() OVERRIDE; | 127 virtual void* GetConfig() OVERRIDE; |
126 virtual unsigned GetFormat() OVERRIDE; | 128 virtual unsigned GetFormat() OVERRIDE; |
127 | 129 |
128 GLSurface* surface() const { return surface_.get(); } | 130 GLSurface* surface() const { return surface_.get(); } |
129 | 131 |
130 private: | 132 private: |
131 scoped_refptr<GLSurface> surface_; | 133 scoped_refptr<GLSurface> surface_; |
132 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 134 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
133 }; | 135 }; |
134 | 136 |
135 } // namespace gfx | 137 } // namespace gfx |
136 | 138 |
137 #endif // UI_GFX_GL_GL_SURFACE_H_ | 139 #endif // UI_GFX_GL_GL_SURFACE_H_ |
OLD | NEW |