| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // the calling thread (i.e. same thread CommitOverlayPlanesAsync is called). | 128 // the calling thread (i.e. same thread CommitOverlayPlanesAsync is called). |
| 129 virtual void CommitOverlayPlanesAsync(const SwapCompletionCallback& callback); | 129 virtual void CommitOverlayPlanesAsync(const SwapCompletionCallback& callback); |
| 130 | 130 |
| 131 // Initialize GL bindings. | 131 // Initialize GL bindings. |
| 132 static bool InitializeOneOff(); | 132 static bool InitializeOneOff(); |
| 133 | 133 |
| 134 // Called after a context is made current with this surface. Returns false | 134 // Called after a context is made current with this surface. Returns false |
| 135 // on error. | 135 // on error. |
| 136 virtual bool OnMakeCurrent(GLContext* context); | 136 virtual bool OnMakeCurrent(GLContext* context); |
| 137 | 137 |
| 138 // Called when the surface is bound as the current framebuffer for the | |
| 139 // current context. | |
| 140 virtual void NotifyWasBound(); | |
| 141 | |
| 142 // Used for explicit buffer management. | 138 // Used for explicit buffer management. |
| 143 virtual bool SetBackbufferAllocation(bool allocated); | 139 virtual bool SetBackbufferAllocation(bool allocated); |
| 144 virtual void SetFrontbufferAllocation(bool allocated); | 140 virtual void SetFrontbufferAllocation(bool allocated); |
| 145 | 141 |
| 146 // Get a handle used to share the surface with another process. Returns null | 142 // Get a handle used to share the surface with another process. Returns null |
| 147 // if this is not possible. | 143 // if this is not possible. |
| 148 virtual void* GetShareHandle(); | 144 virtual void* GetShareHandle(); |
| 149 | 145 |
| 150 // Get the platform specific display on which this surface resides, if | 146 // Get the platform specific display on which this surface resides, if |
| 151 // available. | 147 // available. |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 292 |
| 297 private: | 293 private: |
| 298 scoped_refptr<GLSurface> surface_; | 294 scoped_refptr<GLSurface> surface_; |
| 299 | 295 |
| 300 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 296 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
| 301 }; | 297 }; |
| 302 | 298 |
| 303 } // namespace gfx | 299 } // namespace gfx |
| 304 | 300 |
| 305 #endif // UI_GL_GL_SURFACE_H_ | 301 #endif // UI_GL_GL_SURFACE_H_ |
| OLD | NEW |