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

Unified Diff: ui/gl/gl_surface_egl.cc

Issue 2698573002: Support offscreen contexts which own their backing surface (Closed)
Patch Set: Rebase and retry again Created 3 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
« no previous file with comments | « tools/metrics/histograms/histograms.xml ('k') | no next file » | 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 444ae109dc7d1bf380af2a821350ae85892ea56d..9196ca0b094fb5621a4fc78e7efec853cd56b91f 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -274,6 +274,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)) {
@@ -284,6 +285,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
@@ -310,6 +314,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,
@@ -324,6 +334,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 | « tools/metrics/histograms/histograms.xml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698