| 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_H_ | 5 #ifndef UI_GL_GL_SURFACE_H_ |
| 6 #define UI_GL_GL_SURFACE_H_ | 6 #define UI_GL_GL_SURFACE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 151 |
| 152 DISALLOW_COPY_AND_ASSIGN(GLSurface); | 152 DISALLOW_COPY_AND_ASSIGN(GLSurface); |
| 153 }; | 153 }; |
| 154 | 154 |
| 155 // Implementation of GLSurface that forwards all calls through to another | 155 // Implementation of GLSurface that forwards all calls through to another |
| 156 // GLSurface. | 156 // GLSurface. |
| 157 class GL_EXPORT GLSurfaceAdapter : public GLSurface { | 157 class GL_EXPORT GLSurfaceAdapter : public GLSurface { |
| 158 public: | 158 public: |
| 159 explicit GLSurfaceAdapter(GLSurface* surface); | 159 explicit GLSurfaceAdapter(GLSurface* surface); |
| 160 | 160 |
| 161 virtual bool Initialize() OVERRIDE; | 161 virtual bool Initialize() override; |
| 162 virtual void Destroy() OVERRIDE; | 162 virtual void Destroy() override; |
| 163 virtual bool Resize(const gfx::Size& size) OVERRIDE; | 163 virtual bool Resize(const gfx::Size& size) override; |
| 164 virtual bool Recreate() OVERRIDE; | 164 virtual bool Recreate() override; |
| 165 virtual bool DeferDraws() OVERRIDE; | 165 virtual bool DeferDraws() override; |
| 166 virtual bool IsOffscreen() OVERRIDE; | 166 virtual bool IsOffscreen() override; |
| 167 virtual bool SwapBuffers() OVERRIDE; | 167 virtual bool SwapBuffers() override; |
| 168 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; | 168 virtual bool PostSubBuffer(int x, int y, int width, int height) override; |
| 169 virtual bool SupportsPostSubBuffer() OVERRIDE; | 169 virtual bool SupportsPostSubBuffer() override; |
| 170 virtual gfx::Size GetSize() OVERRIDE; | 170 virtual gfx::Size GetSize() override; |
| 171 virtual void* GetHandle() OVERRIDE; | 171 virtual void* GetHandle() override; |
| 172 virtual unsigned int GetBackingFrameBufferObject() OVERRIDE; | 172 virtual unsigned int GetBackingFrameBufferObject() override; |
| 173 virtual bool OnMakeCurrent(GLContext* context) OVERRIDE; | 173 virtual bool OnMakeCurrent(GLContext* context) override; |
| 174 virtual bool SetBackbufferAllocation(bool allocated) OVERRIDE; | 174 virtual bool SetBackbufferAllocation(bool allocated) override; |
| 175 virtual void SetFrontbufferAllocation(bool allocated) OVERRIDE; | 175 virtual void SetFrontbufferAllocation(bool allocated) override; |
| 176 virtual void* GetShareHandle() OVERRIDE; | 176 virtual void* GetShareHandle() override; |
| 177 virtual void* GetDisplay() OVERRIDE; | 177 virtual void* GetDisplay() override; |
| 178 virtual void* GetConfig() OVERRIDE; | 178 virtual void* GetConfig() override; |
| 179 virtual unsigned GetFormat() OVERRIDE; | 179 virtual unsigned GetFormat() override; |
| 180 virtual VSyncProvider* GetVSyncProvider() OVERRIDE; | 180 virtual VSyncProvider* GetVSyncProvider() override; |
| 181 virtual bool ScheduleOverlayPlane(int z_order, | 181 virtual bool ScheduleOverlayPlane(int z_order, |
| 182 OverlayTransform transform, | 182 OverlayTransform transform, |
| 183 GLImage* image, | 183 GLImage* image, |
| 184 const Rect& bounds_rect, | 184 const Rect& bounds_rect, |
| 185 const RectF& crop_rect) OVERRIDE; | 185 const RectF& crop_rect) override; |
| 186 virtual bool IsSurfaceless() const OVERRIDE; | 186 virtual bool IsSurfaceless() const override; |
| 187 | 187 |
| 188 GLSurface* surface() const { return surface_.get(); } | 188 GLSurface* surface() const { return surface_.get(); } |
| 189 | 189 |
| 190 protected: | 190 protected: |
| 191 virtual ~GLSurfaceAdapter(); | 191 virtual ~GLSurfaceAdapter(); |
| 192 | 192 |
| 193 private: | 193 private: |
| 194 scoped_refptr<GLSurface> surface_; | 194 scoped_refptr<GLSurface> surface_; |
| 195 | 195 |
| 196 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 196 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
| 197 }; | 197 }; |
| 198 | 198 |
| 199 } // namespace gfx | 199 } // namespace gfx |
| 200 | 200 |
| 201 #endif // UI_GL_GL_SURFACE_H_ | 201 #endif // UI_GL_GL_SURFACE_H_ |
| OLD | NEW |