Commit d1971544 authored by apatrick@chromium.org's avatar apatrick@chromium.org

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
parent 52955a22
......@@ -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_) {
......
......@@ -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
......
......@@ -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,
......
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment