Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Unified Diff: ui/gl/gl_surface.h

Issue 1652873002: Android: Use virtualized context only for those with compatible config (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/gl/gl_surface.h
diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h
index 3b08ebc8d57ce5057fd9af29844c6e9df56ab0cd..d73d0ed131fd5aca04cdc6c7ade008e9e6a9fb15 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
};
@@ -152,7 +152,7 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> {
virtual void* GetConfig();
// 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 +211,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 +229,8 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> {
static bool ExtensionsContain(const char* extensions, const char* name);
+ GLSurface::Format format_;
no sievers 2016/02/19 20:25:18 Can you initialize this? Actually, do we really ne
Jinsuk Kim 2016/02/20 13:56:57 Removed.
+
private:
friend class base::RefCounted<GLSurface>;
friend class GLContext;
@@ -279,7 +276,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,

Powered by Google App Engine
This is Rietveld 408576698