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

Side by Side Diff: ui/gfx/gl/gl_surface_egl.cc

Issue 7598013: Do not allocate depth-stencil buffers for GLSurfaces. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/gl/gl_context_osmesa.cc ('k') | ui/gfx/gl/gl_surface_glx.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "ui/gfx/gl/gl_surface_egl.h" 5 #include "ui/gfx/gl/gl_surface_egl.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "third_party/angle/include/EGL/egl.h" 10 #include "third_party/angle/include/EGL/egl.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 return false; 59 return false;
60 } 60 }
61 61
62 // Choose an EGL configuration. 62 // Choose an EGL configuration.
63 static const EGLint kConfigAttribs[] = { 63 static const EGLint kConfigAttribs[] = {
64 EGL_BUFFER_SIZE, 32, 64 EGL_BUFFER_SIZE, 32,
65 EGL_ALPHA_SIZE, 8, 65 EGL_ALPHA_SIZE, 8,
66 EGL_BLUE_SIZE, 8, 66 EGL_BLUE_SIZE, 8,
67 EGL_GREEN_SIZE, 8, 67 EGL_GREEN_SIZE, 8,
68 EGL_RED_SIZE, 8, 68 EGL_RED_SIZE, 8,
69 EGL_DEPTH_SIZE, 16,
70 EGL_STENCIL_SIZE, 8,
71 EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, 69 EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
72 EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PBUFFER_BIT, 70 EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PBUFFER_BIT,
73 EGL_NONE 71 EGL_NONE
74 }; 72 };
75 73
76 EGLint num_configs; 74 EGLint num_configs;
77 if (!eglChooseConfig(g_display, 75 if (!eglChooseConfig(g_display,
78 kConfigAttribs, 76 kConfigAttribs,
79 NULL, 77 NULL,
80 0, 78 0,
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 294
297 gfx::Size PbufferGLSurfaceEGL::GetSize() { 295 gfx::Size PbufferGLSurfaceEGL::GetSize() {
298 return size_; 296 return size_;
299 } 297 }
300 298
301 EGLSurface PbufferGLSurfaceEGL::GetHandle() { 299 EGLSurface PbufferGLSurfaceEGL::GetHandle() {
302 return surface_; 300 return surface_;
303 } 301 }
304 302
305 } // namespace gfx 303 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_context_osmesa.cc ('k') | ui/gfx/gl/gl_surface_glx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698