Chromium Code Reviews| 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 24 matching lines...) Expand all Loading... | |
| 35 | 35 |
| 36 // Encapsulates a surface that can be rendered to with GL, hiding platform | 36 // Encapsulates a surface that can be rendered to with GL, hiding platform |
| 37 // specific management. | 37 // specific management. |
| 38 class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { | 38 class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { |
| 39 public: | 39 public: |
| 40 GLSurface(); | 40 GLSurface(); |
| 41 | 41 |
| 42 // Minimum bit depth of surface. | 42 // Minimum bit depth of surface. |
| 43 enum Format { | 43 enum Format { |
| 44 SURFACE_ARGB8888, | 44 SURFACE_ARGB8888, |
| 45 SURFACE_ARGB8888_DEPTH24, | |
| 45 SURFACE_RGB565, | 46 SURFACE_RGB565, |
| 47 SURFACE_RGB565_DEPTH24, | |
|
piman
2016/11/16 00:44:02
It seems like this won't scale to more depth bits
klausw
2017/01/05 02:17:43
See https://codereview.chromium.org/2616723002 for
| |
| 46 SURFACE_OSMESA_BGRA, | 48 SURFACE_OSMESA_BGRA, |
| 47 SURFACE_OSMESA_RGBA, | 49 SURFACE_OSMESA_RGBA, |
| 48 SURFACE_SURFACELESS, | 50 SURFACE_SURFACELESS, |
| 49 SURFACE_DEFAULT = SURFACE_ARGB8888 | 51 SURFACE_DEFAULT = SURFACE_ARGB8888 |
| 50 }; | 52 }; |
| 51 | 53 |
| 52 // (Re)create the surface. TODO(apatrick): This is an ugly hack to allow the | 54 // (Re)create the surface. TODO(apatrick): This is an ugly hack to allow the |
| 53 // EGL surface associated to be recreated without destroying the associated | 55 // EGL surface associated to be recreated without destroying the associated |
| 54 // context. The implementation of this function for other GLSurface derived | 56 // context. The implementation of this function for other GLSurface derived |
| 55 // classes is in a pending changelist. | 57 // classes is in a pending changelist. |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 295 | 297 |
| 296 // 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 |
| 297 // scoped_refptr containing the initialized GLSurface or nullptr if | 299 // scoped_refptr containing the initialized GLSurface or nullptr if |
| 298 // initialization fails. | 300 // initialization fails. |
| 299 GL_EXPORT scoped_refptr<GLSurface> InitializeGLSurface( | 301 GL_EXPORT scoped_refptr<GLSurface> InitializeGLSurface( |
| 300 scoped_refptr<GLSurface> surface); | 302 scoped_refptr<GLSurface> surface); |
| 301 | 303 |
| 302 } // namespace gl | 304 } // namespace gl |
| 303 | 305 |
| 304 #endif // UI_GL_GL_SURFACE_H_ | 306 #endif // UI_GL_GL_SURFACE_H_ |
| OLD | NEW |