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

Unified Diff: ui/gl/gl_surface_egl.cc

Issue 2456213002: WebVR: implement SetSurfaceHandleCHROMIUM extension for gvr_device.
Patch Set: Rebase, set dependency. Created 3 years, 11 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
« no previous file with comments | « ui/gl/gl_context_egl.cc ('k') | ui/gl/init/gl_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_egl.cc
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index 1d5c1409980618730e2f732cfd15b916bfeab6c6..daf7f5176d12850c11cf91d82b11e8f24fbfdb39 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -242,6 +242,7 @@ bool ValidateEglConfig(EGLDisplay display,
EGLConfig ChooseConfig(GLSurfaceFormat format) {
// Choose an EGL configuration.
// On X this is only used for PBuffer surfaces.
+
std::vector<EGLint> renderable_types;
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableES3GLContext)) {
@@ -252,6 +253,9 @@ EGLConfig ChooseConfig(GLSurfaceFormat format) {
EGLint buffer_size = format.GetBufferSize();
EGLint alpha_size = 8;
bool want_rgb565 = buffer_size == 16;
+ EGLint depth_size = format.GetDepthBits();
+ EGLint stencil_size = format.GetStencilBits();
+ EGLint samples = format.GetSamples();
#if defined(USE_X11) && !defined(OS_CHROMEOS)
// If we're using ANGLE_NULL, we may not have a display, in which case we
@@ -278,6 +282,12 @@ EGLConfig ChooseConfig(GLSurfaceFormat format) {
8,
EGL_RED_SIZE,
8,
+ EGL_SAMPLES,
+ samples,
+ EGL_DEPTH_SIZE,
+ depth_size,
+ EGL_STENCIL_SIZE,
+ stencil_size,
EGL_RENDERABLE_TYPE,
renderable_type,
EGL_SURFACE_TYPE,
@@ -292,6 +302,12 @@ EGLConfig ChooseConfig(GLSurfaceFormat format) {
6,
EGL_RED_SIZE,
5,
+ EGL_SAMPLES,
+ samples,
+ EGL_DEPTH_SIZE,
+ depth_size,
+ EGL_STENCIL_SIZE,
+ stencil_size,
EGL_RENDERABLE_TYPE,
renderable_type,
EGL_SURFACE_TYPE,
« no previous file with comments | « ui/gl/gl_context_egl.cc ('k') | ui/gl/init/gl_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698