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

Issue 1429083002: gl_surface_egl: ensure off and on screen surfaces use the same EGLConfig (Closed)

Created:
5 years, 1 month ago by Julien Isorce Samsung
Modified:
5 years, 1 month ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, piman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

On Linux desktop, when "use_virtualized_gl_context" is true and when --use-gl=egl then the browser is showing garbage. Indeed in GpuCommandBufferStub::OnInitialize the call to context->Initialize(surface_.get(), gpu_preference_)" fails. The error actually comes from eglMakeContext which returns EGL_BAD_MATCH. Because surface config is not compatible with context config. Problem is that EGL_BUFFER_SIZE is always 32 for off screen surfaces (see gl_surface_egl.cc::InitializeOneOff). Whereas for on screen surfaces EGL_BUFFER_SIZE is the window depth. This depth is by default 24 unless --enable-transparent-visuals is passed to the command line. When using mesa the error is raised here: /* If the context has a config then it must match that of the two * surfaces */ if (ctx->Config) { if ((draw && draw->Config != ctx->Config) || (read && read->Config != ctx->Config)) return _eglError(EGL_BAD_MATCH, "eglMakeCurrent"); from: cgit.freedesktop.org/mesa/mesa/tree/src/egl/main/eglcontext.c#n630 This patch pass the main window depth from browser to gpu process though a new switch kWindowDepth. This allow GLSurfaceEGL::InitializeOneOff to select an EGLConfig that matches with future ON screen surfaces's EGLConfig. Also note that long term plan is to always enable transparent visual, see http://crbug.com/369209. This patch also move the kEnableTransparentVisuals switch from view to x11 switches as it is defined to x11 only. BUG=557389 R=jbauman@chromium.org, hendrikw@chromium.org, piman@chromium.org, sadrul@chromium.org, cwallez1@chromium.org, kbr@chromium.org Review URL: https://codereview.chromium.org/1429083002 TEST= chrome --use-gl=egl --use_virtualized_gl_contexts Committed: https://crrev.com/5ade848cf56941fa2a61cd1c0e2cb9d7349a9194 Cr-Commit-Position: refs/heads/master@{#361114}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 2

Patch Set 4 : #

Total comments: 1

Patch Set 5 : #

Total comments: 8

Patch Set 6 : #

Total comments: 4

Patch Set 7 : #

Patch Set 8 : #

Total comments: 4

Patch Set 9 : #

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -70 lines) Patch
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 2 chunks +13 lines, -0 lines 0 comments Download
M content/browser/gpu/gpu_process_host.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/gpu/gpu_main.cc View 1 2 3 4 5 6 7 2 chunks +7 lines, -0 lines 0 comments Download
M ui/base/x/x11_util.cc View 1 2 3 4 5 6 7 8 9 2 chunks +63 lines, -0 lines 0 comments Download
M ui/base/x/x11_util_internal.h View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -0 lines 0 comments Download
M ui/gfx/x/x11_switches.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M ui/gfx/x/x11_switches.cc View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M ui/gl/gl_surface_egl.cc View 1 2 3 4 5 3 chunks +25 lines, -2 lines 0 comments Download
M ui/views/views_switches.h View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M ui/views/views_switches.cc View 1 2 1 chunk +0 lines, -9 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -4 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc View 1 2 3 4 5 6 7 8 9 3 chunks +15 lines, -51 lines 0 comments Download

Messages

Total messages: 72 (21 generated)
Julien Isorce Samsung
On 2015/10/30 14:59:42, jbauman wrote: > This won't work in the case (can happen on ...
5 years, 1 month ago (2015-11-02 15:17:41 UTC) #1
Julien Isorce Samsung
ping ?
5 years, 1 month ago (2015-11-04 11:51:41 UTC) #2
jbauman
On 2015/11/02 15:17:41, j.isorce wrote: > On 2015/10/30 14:59:42, jbauman wrote: > > This won't ...
5 years, 1 month ago (2015-11-04 21:12:51 UTC) #3
hendrikw
On 2015/11/04 21:12:51, jbauman wrote: > On 2015/11/02 15:17:41, j.isorce wrote: > > On 2015/10/30 ...
5 years, 1 month ago (2015-11-05 01:26:16 UTC) #4
jbauman
On 2015/11/05 01:26:16, hendrikw wrote: > On 2015/11/04 21:12:51, jbauman wrote: > > On 2015/11/02 ...
5 years, 1 month ago (2015-11-05 01:47:14 UTC) #5
Julien Isorce Samsung
On 2015/11/05 01:47:14, jbauman wrote: > On 2015/11/05 01:26:16, hendrikw wrote: > > On 2015/11/04 ...
5 years, 1 month ago (2015-11-05 09:11:53 UTC) #6
hendrikw
On 2015/11/05 09:11:53, j.isorce wrote: > On 2015/11/05 01:47:14, jbauman wrote: > > On 2015/11/05 ...
5 years, 1 month ago (2015-11-06 00:41:07 UTC) #7
jbauman
On 2015/11/05 09:11:53, j.isorce wrote: > On 2015/11/05 01:47:14, jbauman wrote: > > On 2015/11/05 ...
5 years, 1 month ago (2015-11-06 00:41:11 UTC) #8
Julien Isorce Samsung
On 2015/11/06 00:41:11, jbauman wrote: > I'm still fine with keying off of switches::kEnableTransparentVisuals, though. ...
5 years, 1 month ago (2015-11-06 14:13:35 UTC) #9
hendrikw
On 2015/11/06 14:13:35, j.isorce wrote: > On 2015/11/06 00:41:11, jbauman wrote: > > I'm still ...
5 years, 1 month ago (2015-11-06 16:24:47 UTC) #10
Julien Isorce Samsung
On 2015/11/06 16:24:47, hendrikw wrote: > On 2015/11/06 14:13:35, j.isorce wrote: > > On 2015/11/06 ...
5 years, 1 month ago (2015-11-10 21:35:25 UTC) #11
Julien Isorce Samsung
I update CL to "patch set 3", it fixes "chrome --use-gl=egl --use_virtualized_gl_context" on Linux desktop, ...
5 years, 1 month ago (2015-11-11 14:35:17 UTC) #15
hendrikw
https://codereview.chromium.org/1429083002/diff/40001/ui/gl/gl_surface_egl.cc File ui/gl/gl_surface_egl.cc (right): https://codereview.chromium.org/1429083002/diff/40001/ui/gl/gl_surface_egl.cc#newcode302 ui/gl/gl_surface_egl.cc:302: EGLint* config_non_const = const_cast<EGLint*>(kConfigAttribs); Not a big fan of ...
5 years, 1 month ago (2015-11-11 23:55:46 UTC) #16
Julien Isorce Samsung
https://codereview.chromium.org/1429083002/diff/40001/ui/gl/gl_surface_egl.cc File ui/gl/gl_surface_egl.cc (right): https://codereview.chromium.org/1429083002/diff/40001/ui/gl/gl_surface_egl.cc#newcode302 ui/gl/gl_surface_egl.cc:302: EGLint* config_non_const = const_cast<EGLint*>(kConfigAttribs); On 2015/11/11 23:55:46, hendrikw wrote: ...
5 years, 1 month ago (2015-11-12 11:06:49 UTC) #17
hendrikw
On 2015/11/12 11:06:49, j.isorce wrote: > https://codereview.chromium.org/1429083002/diff/40001/ui/gl/gl_surface_egl.cc > File ui/gl/gl_surface_egl.cc (right): > > https://codereview.chromium.org/1429083002/diff/40001/ui/gl/gl_surface_egl.cc#newcode302 > ...
5 years, 1 month ago (2015-11-12 16:22:20 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1429083002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1429083002/60001
5 years, 1 month ago (2015-11-16 14:04:25 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/118855)
5 years, 1 month ago (2015-11-16 14:12:19 UTC) #24
Julien Isorce Samsung
On 2015/11/12 16:22:20, hendrikw wrote: > LGTM (but still requires owner review) Hi, please one ...
5 years, 1 month ago (2015-11-16 17:41:36 UTC) #25
jbauman
content/browser/gpu lgtm
5 years, 1 month ago (2015-11-16 22:51:32 UTC) #26
sadrul
Can you get a review from a ui/gl/ owner first? I can then stamp the ...
5 years, 1 month ago (2015-11-17 04:47:16 UTC) #27
Julien Isorce Samsung
5 years, 1 month ago (2015-11-17 07:15:26 UTC) #29
Ken Russell (switch to Gerrit)
Please file a bug about this and link it to the others. This looks OK ...
5 years, 1 month ago (2015-11-17 19:55:18 UTC) #31
Corentin Wallez
On 2015/11/17 19:55:18, Ken Russell wrote: > Please file a bug about this and link ...
5 years, 1 month ago (2015-11-17 20:24:04 UTC) #32
piman
https://codereview.chromium.org/1429083002/diff/60001/ui/gl/gl_surface_egl.cc File ui/gl/gl_surface_egl.cc (right): https://codereview.chromium.org/1429083002/diff/60001/ui/gl/gl_surface_egl.cc#newcode286 ui/gl/gl_surface_egl.cc:286: switches::kEnableTransparentVisuals)) { I would prefer if we didn't rely ...
5 years, 1 month ago (2015-11-17 20:53:52 UTC) #33
Julien Isorce Samsung
On 2015/11/17 19:55:18, Ken Russell wrote: > Please file a bug about this and link ...
5 years, 1 month ago (2015-11-17 23:36:58 UTC) #34
Corentin Wallez
On 2015/11/17 20:53:52, piman (slow to review) wrote: > https://codereview.chromium.org/1429083002/diff/60001/ui/gl/gl_surface_egl.cc > File ui/gl/gl_surface_egl.cc (right): > ...
5 years, 1 month ago (2015-11-18 20:11:58 UTC) #35
Ken Russell (switch to Gerrit)
I agree with Antoine's point that this CL adds a deep and subtle dependency between ...
5 years, 1 month ago (2015-11-19 02:35:41 UTC) #36
Julien Isorce Samsung
On 2015/11/19 02:35:41, Ken Russell wrote: > I agree with Antoine's point that this CL ...
5 years, 1 month ago (2015-11-19 18:35:24 UTC) #37
Corentin Wallez
On 2015/11/19 18:35:24, j.isorce wrote: > On 2015/11/19 02:35:41, Ken Russell wrote: > > I ...
5 years, 1 month ago (2015-11-19 18:44:32 UTC) #38
Julien Isorce Samsung
On 2015/11/19 18:44:32, cwallez1 wrote: > Sounds good, thanks for taking the time to rework ...
5 years, 1 month ago (2015-11-20 01:16:03 UTC) #40
piman
https://codereview.chromium.org/1429083002/diff/80001/ui/base/x/x11_util.cc File ui/base/x/x11_util.cc (right): https://codereview.chromium.org/1429083002/diff/80001/ui/base/x/x11_util.cc#newcode1463 ui/base/x/x11_util.cc:1463: std::call_once(init_flag, ChooseARGBVisualForWindowOnce, &s_visual, &s_depth); std::call_once is a c++11 library ...
5 years, 1 month ago (2015-11-20 01:44:41 UTC) #41
Julien Isorce Samsung
Thx for the review. I addressed remarks in "Patch Set 6". https://codereview.chromium.org/1429083002/diff/80001/ui/base/x/x11_util.cc File ui/base/x/x11_util.cc (right): ...
5 years, 1 month ago (2015-11-20 09:13:56 UTC) #42
piman
LGTM + 2 nits https://codereview.chromium.org/1429083002/diff/100001/ui/base/x/x11_util.cc File ui/base/x/x11_util.cc (right): https://codereview.chromium.org/1429083002/diff/100001/ui/base/x/x11_util.cc#newcode1448 ui/base/x/x11_util.cc:1448: s_depth = info.depth; nit: break; ...
5 years, 1 month ago (2015-11-20 21:56:58 UTC) #43
Julien Isorce Samsung
Patch 7 addressed last remarks. Cheers. https://codereview.chromium.org/1429083002/diff/100001/ui/base/x/x11_util.cc File ui/base/x/x11_util.cc (right): https://codereview.chromium.org/1429083002/diff/100001/ui/base/x/x11_util.cc#newcode1448 ui/base/x/x11_util.cc:1448: s_depth = info.depth; ...
5 years, 1 month ago (2015-11-20 23:26:40 UTC) #44
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1429083002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1429083002/120001
5 years, 1 month ago (2015-11-20 23:28:24 UTC) #46
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_compile_dbg_ng/builds/123764) linux_chromium_chromeos_rel_ng on ...
5 years, 1 month ago (2015-11-20 23:54:46 UTC) #48
Julien Isorce Samsung
On 2015/11/20 23:54:46, commit-bot: I haz the power wrote: > Dry run: Try jobs failed ...
5 years, 1 month ago (2015-11-21 21:32:09 UTC) #49
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1429083002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1429083002/140001
5 years, 1 month ago (2015-11-21 21:32:46 UTC) #51
Corentin Wallez
LGTM Taking advantage of the CQ failure to add in a couple more nits. Thank ...
5 years, 1 month ago (2015-11-22 04:09:01 UTC) #52
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-22 04:51:46 UTC) #54
Julien Isorce Samsung
https://codereview.chromium.org/1429083002/diff/140001/ui/base/x/x11_util.cc File ui/base/x/x11_util.cc (right): https://codereview.chromium.org/1429083002/diff/140001/ui/base/x/x11_util.cc#newcode1422 ui/base/x/x11_util.cc:1422: // TODO(cwallez) make the switch be a constant again ...
5 years, 1 month ago (2015-11-23 08:28:03 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1429083002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1429083002/160001
5 years, 1 month ago (2015-11-23 08:28:23 UTC) #58
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/121187)
5 years, 1 month ago (2015-11-23 08:35:56 UTC) #60
Julien Isorce Samsung
On 2015/11/23 08:35:56, commit-bot: I haz the power wrote: > Try jobs failed on following ...
5 years, 1 month ago (2015-11-23 12:00:26 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1429083002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1429083002/180001
5 years, 1 month ago (2015-11-23 12:01:17 UTC) #64
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/121208)
5 years, 1 month ago (2015-11-23 12:08:20 UTC) #66
Julien Isorce Samsung
** Presubmit ERRORS ** Missing LGTM from an OWNER for these files: ui/base/x/x11_util.cc ui/base/x/x11_util_internal.h ui/gfx/x/x11_switches.cc ...
5 years, 1 month ago (2015-11-23 12:37:27 UTC) #67
sadrul
lgtm
5 years, 1 month ago (2015-11-23 15:54:51 UTC) #68
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1429083002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1429083002/180001
5 years, 1 month ago (2015-11-23 16:09:31 UTC) #70
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years, 1 month ago (2015-11-23 16:15:24 UTC) #71
commit-bot: I haz the power
5 years, 1 month ago (2015-11-23 16:16:19 UTC) #72
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/5ade848cf56941fa2a61cd1c0e2cb9d7349a9194
Cr-Commit-Position: refs/heads/master@{#361114}

Powered by Google App Engine
This is Rietveld 408576698