| 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/callback.h" | 10 #include "base/callback.h" |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 GLSurfaceFormat GetFormat() override; | 266 GLSurfaceFormat GetFormat() override; |
| 267 gfx::VSyncProvider* GetVSyncProvider() override; | 267 gfx::VSyncProvider* GetVSyncProvider() override; |
| 268 bool ScheduleOverlayPlane(int z_order, | 268 bool ScheduleOverlayPlane(int z_order, |
| 269 gfx::OverlayTransform transform, | 269 gfx::OverlayTransform transform, |
| 270 GLImage* image, | 270 GLImage* image, |
| 271 const gfx::Rect& bounds_rect, | 271 const gfx::Rect& bounds_rect, |
| 272 const gfx::RectF& crop_rect) override; | 272 const gfx::RectF& crop_rect) override; |
| 273 bool IsSurfaceless() const override; | 273 bool IsSurfaceless() const override; |
| 274 bool FlipsVertically() const override; | 274 bool FlipsVertically() const override; |
| 275 bool BuffersFlipped() const override; | 275 bool BuffersFlipped() const override; |
| 276 void OnSetSwapInterval(int interval) override; |
| 276 | 277 |
| 277 GLSurface* surface() const { return surface_.get(); } | 278 GLSurface* surface() const { return surface_.get(); } |
| 278 | 279 |
| 279 protected: | 280 protected: |
| 280 ~GLSurfaceAdapter() override; | 281 ~GLSurfaceAdapter() override; |
| 281 | 282 |
| 282 private: | 283 private: |
| 283 scoped_refptr<GLSurface> surface_; | 284 scoped_refptr<GLSurface> surface_; |
| 284 | 285 |
| 285 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 286 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
| 286 }; | 287 }; |
| 287 | 288 |
| 288 // Wraps GLSurface in scoped_refptr and tries to initializes it. Returns a | 289 // Wraps GLSurface in scoped_refptr and tries to initializes it. Returns a |
| 289 // scoped_refptr containing the initialized GLSurface or nullptr if | 290 // scoped_refptr containing the initialized GLSurface or nullptr if |
| 290 // initialization fails. | 291 // initialization fails. |
| 291 GL_EXPORT scoped_refptr<GLSurface> InitializeGLSurface( | 292 GL_EXPORT scoped_refptr<GLSurface> InitializeGLSurface( |
| 292 scoped_refptr<GLSurface> surface); | 293 scoped_refptr<GLSurface> surface); |
| 293 | 294 |
| 294 GL_EXPORT scoped_refptr<GLSurface> InitializeGLSurfaceWithFormat( | 295 GL_EXPORT scoped_refptr<GLSurface> InitializeGLSurfaceWithFormat( |
| 295 scoped_refptr<GLSurface> surface, GLSurfaceFormat format); | 296 scoped_refptr<GLSurface> surface, GLSurfaceFormat format); |
| 296 | 297 |
| 297 } // namespace gl | 298 } // namespace gl |
| 298 | 299 |
| 299 #endif // UI_GL_GL_SURFACE_H_ | 300 #endif // UI_GL_GL_SURFACE_H_ |
| OLD | NEW |