| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 // Schedule a CALayer to be shown at swap time. | 191 // Schedule a CALayer to be shown at swap time. |
| 192 // All arguments correspond to their CALayer properties. | 192 // All arguments correspond to their CALayer properties. |
| 193 virtual bool ScheduleCALayer(const ui::CARendererLayerParams& params); | 193 virtual bool ScheduleCALayer(const ui::CARendererLayerParams& params); |
| 194 | 194 |
| 195 struct GL_EXPORT CALayerInUseQuery { | 195 struct GL_EXPORT CALayerInUseQuery { |
| 196 CALayerInUseQuery(); | 196 CALayerInUseQuery(); |
| 197 explicit CALayerInUseQuery(const CALayerInUseQuery&); | 197 explicit CALayerInUseQuery(const CALayerInUseQuery&); |
| 198 ~CALayerInUseQuery(); | 198 ~CALayerInUseQuery(); |
| 199 unsigned texture = 0; | 199 unsigned texture = 0; |
| 200 scoped_refptr<GLImage> image; | 200 scoped_refptr<GLImage> image; |
| 201 bool needs_gpu_memory_buffer_handle = false; |
| 201 }; | 202 }; |
| 202 virtual void ScheduleCALayerInUseQuery( | 203 virtual void ScheduleCALayerInUseQuery( |
| 203 std::vector<CALayerInUseQuery> queries); | 204 std::vector<CALayerInUseQuery> queries); |
| 204 | 205 |
| 205 virtual bool IsSurfaceless() const; | 206 virtual bool IsSurfaceless() const; |
| 206 | 207 |
| 207 virtual bool FlipsVertically() const; | 208 virtual bool FlipsVertically() const; |
| 208 | 209 |
| 209 // Returns true if SwapBuffers or PostSubBuffers causes a flip, such that | 210 // Returns true if SwapBuffers or PostSubBuffers causes a flip, such that |
| 210 // the next buffer may be 2 frames old. | 211 // the next buffer may be 2 frames old. |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 297 |
| 297 // Wraps GLSurface in scoped_refptr and tries to initializes it. Returns a | 298 // Wraps GLSurface in scoped_refptr and tries to initializes it. Returns a |
| 298 // scoped_refptr containing the initialized GLSurface or nullptr if | 299 // scoped_refptr containing the initialized GLSurface or nullptr if |
| 299 // initialization fails. | 300 // initialization fails. |
| 300 GL_EXPORT scoped_refptr<GLSurface> InitializeGLSurface( | 301 GL_EXPORT scoped_refptr<GLSurface> InitializeGLSurface( |
| 301 scoped_refptr<GLSurface> surface); | 302 scoped_refptr<GLSurface> surface); |
| 302 | 303 |
| 303 } // namespace gl | 304 } // namespace gl |
| 304 | 305 |
| 305 #endif // UI_GL_GL_SURFACE_H_ | 306 #endif // UI_GL_GL_SURFACE_H_ |
| OLD | NEW |