diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-09 07:56:45 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-09 07:56:45 +0000 |
commit | d19715442a4818852c6d5995a81e4db94fad5b29 (patch) | |
tree | 47344432403ce01611d3220c9b5b2ab60ee2798d /ui | |
parent | 52955a222748613039115de9d3c3be66fed0290d (diff) | |
download | chromium_src-d19715442a4818852c6d5995a81e4db94fad5b29.zip chromium_src-d19715442a4818852c6d5995a81e4db94fad5b29.tar.gz chromium_src-d19715442a4818852c6d5995a81e4db94fad5b29.tar.bz2 |
Do not allocate depth-stencil buffers for GLSurfaces.
We don't need them here. Whenever we need a depth-stencil buffer, it's as a renderbuffer attached to a non-default FBO.
This will save some video memory.
Review URL: http://codereview.chromium.org/7598013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95964 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gfx/gl/gl_context_osmesa.cc | 4 | ||||
-rw-r--r-- | ui/gfx/gl/gl_surface_egl.cc | 2 | ||||
-rw-r--r-- | ui/gfx/gl/gl_surface_glx.cc | 2 | ||||
-rw-r--r-- | ui/gfx/gl/gl_surface_wgl.cc | 4 |
4 files changed, 4 insertions, 8 deletions
diff --git a/ui/gfx/gl/gl_context_osmesa.cc b/ui/gfx/gl/gl_context_osmesa.cc index a4dbf22..c6b8c42 100644 --- a/ui/gfx/gl/gl_context_osmesa.cc +++ b/ui/gfx/gl/gl_context_osmesa.cc @@ -30,8 +30,8 @@ bool GLContextOSMesa::Initialize(GLSurface* compatible_surface) { GLuint format = static_cast<GLSurfaceOSMesa*>(compatible_surface)->GetFormat(); context_ = OSMesaCreateContextExt(format, - 24, // depth bits - 8, // stencil bits + 0, // depth bits + 0, // stencil bits 0, // accum bits share_handle); if (!context_) { diff --git a/ui/gfx/gl/gl_surface_egl.cc b/ui/gfx/gl/gl_surface_egl.cc index bf509bd..5bc03ad 100644 --- a/ui/gfx/gl/gl_surface_egl.cc +++ b/ui/gfx/gl/gl_surface_egl.cc @@ -66,8 +66,6 @@ bool GLSurfaceEGL::InitializeOneOff() { EGL_BLUE_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_RED_SIZE, 8, - EGL_DEPTH_SIZE, 16, - EGL_STENCIL_SIZE, 8, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PBUFFER_BIT, EGL_NONE diff --git a/ui/gfx/gl/gl_surface_glx.cc b/ui/gfx/gl/gl_surface_glx.cc index 30cf490..061a60e 100644 --- a/ui/gfx/gl/gl_surface_glx.cc +++ b/ui/gfx/gl/gl_surface_glx.cc @@ -214,8 +214,6 @@ bool PbufferGLSurfaceGLX::Initialize() { GLX_BLUE_SIZE, 8, GLX_GREEN_SIZE, 8, GLX_RED_SIZE, 8, - GLX_DEPTH_SIZE, 16, // TODO(apatrick): support optional depth buffer - GLX_STENCIL_SIZE, 8, GLX_RENDER_TYPE, GLX_RGBA_BIT, GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT, GLX_DOUBLEBUFFER, False, diff --git a/ui/gfx/gl/gl_surface_wgl.cc b/ui/gfx/gl/gl_surface_wgl.cc index 08ac0b6..52772ff 100644 --- a/ui/gfx/gl/gl_surface_wgl.cc +++ b/ui/gfx/gl/gl_surface_wgl.cc @@ -27,8 +27,8 @@ const PIXELFORMATDESCRIPTOR kPixelFormatDescriptor = { 8, 0, // 8 bit alpha 0, // No accumulation buffer. 0, 0, 0, 0, // Ignore accumulation bits. - 24, // 24 bit z-buffer size. - 8, // 8-bit stencil buffer. + 0, // no z-buffer. + 0, // no stencil buffer. 0, // No aux buffer. PFD_MAIN_PLANE, // Main drawing plane (not overlay). 0, // Reserved. |