| 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 class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { | 35 class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { |
| 36 public: | 36 public: |
| 37 GLSurface(); | 37 GLSurface(); |
| 38 | 38 |
| 39 // Minimum bit depth of surface. | 39 // Minimum bit depth of surface. |
| 40 enum Format { | 40 enum Format { |
| 41 SURFACE_ARGB8888, | 41 SURFACE_ARGB8888, |
| 42 SURFACE_RGB565, | 42 SURFACE_RGB565, |
| 43 SURFACE_OSMESA_BGRA, | 43 SURFACE_OSMESA_BGRA, |
| 44 SURFACE_OSMESA_RGBA, | 44 SURFACE_OSMESA_RGBA, |
| 45 SURFACE_SURFACELESS, |
| 45 SURFACE_DEFAULT = SURFACE_ARGB8888 | 46 SURFACE_DEFAULT = SURFACE_ARGB8888 |
| 46 }; | 47 }; |
| 47 | 48 |
| 48 // (Re)create the surface. TODO(apatrick): This is an ugly hack to allow the | 49 // (Re)create the surface. TODO(apatrick): This is an ugly hack to allow the |
| 49 // EGL surface associated to be recreated without destroying the associated | 50 // EGL surface associated to be recreated without destroying the associated |
| 50 // context. The implementation of this function for other GLSurface derived | 51 // context. The implementation of this function for other GLSurface derived |
| 51 // classes is in a pending changelist. | 52 // classes is in a pending changelist. |
| 52 virtual bool Initialize(); | 53 virtual bool Initialize(); |
| 53 virtual bool Initialize(GLSurface::Format format); | 54 virtual bool Initialize(GLSurface::Format format); |
| 54 | 55 |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 | 295 |
| 295 private: | 296 private: |
| 296 scoped_refptr<GLSurface> surface_; | 297 scoped_refptr<GLSurface> surface_; |
| 297 | 298 |
| 298 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 299 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
| 299 }; | 300 }; |
| 300 | 301 |
| 301 } // namespace gfx | 302 } // namespace gfx |
| 302 | 303 |
| 303 #endif // UI_GL_GL_SURFACE_H_ | 304 #endif // UI_GL_GL_SURFACE_H_ |
| OLD | NEW |