Index: ui/gl/gl_surface.h |
diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h |
index 3b08ebc8d57ce5057fd9af29844c6e9df56ab0cd..85032c7200c39bc2a6dd303a06dad8c4161cd5d3 100644 |
--- a/ui/gl/gl_surface.h |
+++ b/ui/gl/gl_surface.h |
@@ -38,8 +38,8 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { |
// Minimum bit depth of surface. |
enum Format { |
- SURFACE_ARGB8888 = 1, // 32 bits |
- SURFACE_RGB565 = 2, // 16 bits |
+ SURFACE_ARGB8888, |
+ SURFACE_RGB565, |
SURFACE_DEFAULT = SURFACE_ARGB8888 |
}; |
@@ -151,8 +151,11 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { |
// Get the platfrom specific configuration for this surface, if available. |
virtual void* GetConfig(); |
+ // Get the default format of the surface. |
+ virtual GLSurface::Format GetDefaultFormat() const; |
no sievers
2016/02/18 20:19:45
This is not needed anymore, right? Because how we
Jinsuk Kim
2016/02/19 01:04:40
Removed.
|
+ |
// Get the GL pixel format of the surface, if available. |
- virtual unsigned GetFormat(); |
+ virtual GLSurface::Format GetFormat(); |
// Get access to a helper providing time of recent refresh and period |
// of screen refresh. If unavailable, returns NULL. |
@@ -211,12 +214,7 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { |
// Create a GL surface used for offscreen rendering. |
static scoped_refptr<GLSurface> CreateOffscreenGLSurface( |
- const gfx::Size& size) { |
- return CreateOffscreenGLSurface(size, SURFACE_DEFAULT); |
- } |
- |
- static scoped_refptr<GLSurface> CreateOffscreenGLSurface( |
- const gfx::Size& size, GLSurface::Format format); |
+ const gfx::Size& size); |
static GLSurface* GetCurrent(); |
@@ -234,6 +232,8 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { |
static bool ExtensionsContain(const char* extensions, const char* name); |
+ GLSurface::Format format_; |
+ |
private: |
friend class base::RefCounted<GLSurface>; |
friend class GLContext; |
@@ -279,7 +279,7 @@ class GL_EXPORT GLSurfaceAdapter : public GLSurface { |
void* GetShareHandle() override; |
void* GetDisplay() override; |
void* GetConfig() override; |
- unsigned GetFormat() override; |
+ GLSurface::Format GetFormat() override; |
VSyncProvider* GetVSyncProvider() override; |
bool ScheduleOverlayPlane(int z_order, |
OverlayTransform transform, |