| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // if this is not possible. | 153 // if this is not possible. |
| 154 virtual void* GetShareHandle(); | 154 virtual void* GetShareHandle(); |
| 155 | 155 |
| 156 // Get the platform specific display on which this surface resides, if | 156 // Get the platform specific display on which this surface resides, if |
| 157 // available. | 157 // available. |
| 158 virtual void* GetDisplay(); | 158 virtual void* GetDisplay(); |
| 159 | 159 |
| 160 // Get the platfrom specific configuration for this surface, if available. | 160 // Get the platfrom specific configuration for this surface, if available. |
| 161 virtual void* GetConfig(); | 161 virtual void* GetConfig(); |
| 162 | 162 |
| 163 // Get the key corresponding to the set of GLSurfaces that can be made current |
| 164 // with this GLSurface. |
| 165 virtual unsigned long GetCompatibilityKey(); |
| 166 |
| 163 // Get the GL pixel format of the surface, if available. | 167 // Get the GL pixel format of the surface, if available. |
| 164 virtual GLSurface::Format GetFormat(); | 168 virtual GLSurface::Format GetFormat(); |
| 165 | 169 |
| 166 // Get access to a helper providing time of recent refresh and period | 170 // Get access to a helper providing time of recent refresh and period |
| 167 // of screen refresh. If unavailable, returns NULL. | 171 // of screen refresh. If unavailable, returns NULL. |
| 168 virtual gfx::VSyncProvider* GetVSyncProvider(); | 172 virtual gfx::VSyncProvider* GetVSyncProvider(); |
| 169 | 173 |
| 170 // Schedule an overlay plane to be shown at swap time, or on the next | 174 // Schedule an overlay plane to be shown at swap time, or on the next |
| 171 // CommitOverlayPlanes call. | 175 // CommitOverlayPlanes call. |
| 172 // |z_order| specifies the stacking order of the plane relative to the | 176 // |z_order| specifies the stacking order of the plane relative to the |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 bool SupportsAsyncSwap() override; | 264 bool SupportsAsyncSwap() override; |
| 261 gfx::Size GetSize() override; | 265 gfx::Size GetSize() override; |
| 262 void* GetHandle() override; | 266 void* GetHandle() override; |
| 263 unsigned int GetBackingFramebufferObject() override; | 267 unsigned int GetBackingFramebufferObject() override; |
| 264 bool OnMakeCurrent(GLContext* context) override; | 268 bool OnMakeCurrent(GLContext* context) override; |
| 265 bool SetBackbufferAllocation(bool allocated) override; | 269 bool SetBackbufferAllocation(bool allocated) override; |
| 266 void SetFrontbufferAllocation(bool allocated) override; | 270 void SetFrontbufferAllocation(bool allocated) override; |
| 267 void* GetShareHandle() override; | 271 void* GetShareHandle() override; |
| 268 void* GetDisplay() override; | 272 void* GetDisplay() override; |
| 269 void* GetConfig() override; | 273 void* GetConfig() override; |
| 274 unsigned long GetCompatibilityKey() override; |
| 270 GLSurface::Format GetFormat() override; | 275 GLSurface::Format GetFormat() override; |
| 271 gfx::VSyncProvider* GetVSyncProvider() override; | 276 gfx::VSyncProvider* GetVSyncProvider() override; |
| 272 bool ScheduleOverlayPlane(int z_order, | 277 bool ScheduleOverlayPlane(int z_order, |
| 273 gfx::OverlayTransform transform, | 278 gfx::OverlayTransform transform, |
| 274 GLImage* image, | 279 GLImage* image, |
| 275 const gfx::Rect& bounds_rect, | 280 const gfx::Rect& bounds_rect, |
| 276 const gfx::RectF& crop_rect) override; | 281 const gfx::RectF& crop_rect) override; |
| 277 bool IsSurfaceless() const override; | 282 bool IsSurfaceless() const override; |
| 278 bool FlipsVertically() const override; | 283 bool FlipsVertically() const override; |
| 279 bool BuffersFlipped() const override; | 284 bool BuffersFlipped() const override; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 291 | 296 |
| 292 // Wraps GLSurface in scoped_refptr and tries to initializes it. Returns a | 297 // Wraps GLSurface in scoped_refptr and tries to initializes it. Returns a |
| 293 // scoped_refptr containing the initialized GLSurface or nullptr if | 298 // scoped_refptr containing the initialized GLSurface or nullptr if |
| 294 // initialization fails. | 299 // initialization fails. |
| 295 GL_EXPORT scoped_refptr<GLSurface> InitializeGLSurface( | 300 GL_EXPORT scoped_refptr<GLSurface> InitializeGLSurface( |
| 296 scoped_refptr<GLSurface> surface); | 301 scoped_refptr<GLSurface> surface); |
| 297 | 302 |
| 298 } // namespace gl | 303 } // namespace gl |
| 299 | 304 |
| 300 #endif // UI_GL_GL_SURFACE_H_ | 305 #endif // UI_GL_GL_SURFACE_H_ |
| OLD | NEW |