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

Issue 2347383002: X11: Use better visuals for OpenGL (Closed)

Created:
4 years, 3 months ago by Tom (Use chromium acct)
Modified:
4 years, 2 months ago
CC:
chromium-reviews, sadrul, qsr+mojo_chromium.org, derat+watch_chromium.org, viettrungluu+watch_chromium.org, tfarina, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, piman+watch_chromium.org, darin (slow to review), yusukes+watch_chromium.org, Ken Rockot(use gerrit already)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

X11: Use a better visual for OpenGL This CL delegates picking a transparent visual to the GPU process. Previously, the browser process did not have enough information to decide which visual to use because it couldn't get GL-specific visual information directly. On Nvidia drivers, picking the wrong transparent visual made the browser unusable. Main changes introduced: * Remove command line arguments window-depth, x11-visual-id, and disable_transparent_visuals. * Remove driver bug DISABLE_TRANSPARENT_VISUALS * GPU process picks an ARGB visual and a system visual (which may be different from the default visual) and sends it back in GPUInfo BUG=347333, 369209, 640170, 640170 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/62ba78ffcdf525eb9ed640724e640fcf22fbbf87 Cr-Commit-Position: refs/heads/master@{#422274}

Patch Set 1 #

Patch Set 2 : Fix hang #

Patch Set 3 : IPC works #

Patch Set 4 : Moved visual selection code into its own file #

Patch Set 5 : Refactor #

Patch Set 6 : Fix various tests #

Total comments: 34

Patch Set 7 : Remove GLShareGroupGLX, add GpuDataManagerVisualProxy, refactor #

Patch Set 8 : Rebase #

Total comments: 1

Patch Set 9 : Try to return root visual #

Patch Set 10 : Fix --single-process #

Total comments: 30

Patch Set 11 : Final comments #

Total comments: 1

Patch Set 12 : Shutdown a misbehaving GPU process #

Total comments: 1

Patch Set 13 : auto* #

Unified diffs Side-by-side diffs Delta from patch set Stats (+678 lines, -259 lines) Patch
M content/browser/browser_main_loop.h View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -0 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +43 lines, -23 lines 0 comments Download
M content/browser/gpu/gpu_internals_ui.cc View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M content/browser/gpu/gpu_process_host.cc View 1 2 3 4 5 6 7 8 9 2 chunks +1 line, -3 lines 0 comments Download
M content/gpu/gpu_child_thread.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M content/gpu/gpu_child_thread.cc View 1 2 3 4 5 6 7 8 9 3 chunks +2 lines, -3 lines 0 comments Download
M content/gpu/gpu_main.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M content/gpu/in_process_gpu_thread.cc View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -1 line 0 comments Download
M content/test/gpu/page_sets/gpu_process_tests.py View 1 2 3 4 5 6 7 8 9 10 3 chunks +2 lines, -5 lines 0 comments Download
M extensions/browser/api/app_window/app_window_apitest.cc View 1 2 3 4 5 2 chunks +0 lines, -11 lines 0 comments Download
M gpu/command_buffer/service/gl_context_virtual_unittest.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/in_process_command_buffer.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M gpu/config/gpu_driver_bug_list_json.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -17 lines 0 comments Download
M gpu/config/gpu_driver_bug_workaround_type.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -2 lines 0 comments Download
M gpu/config/gpu_info.h View 1 2 3 4 2 chunks +9 lines, -0 lines 0 comments Download
M gpu/config/gpu_info.cc View 1 2 3 4 3 chunks +15 lines, -1 line 0 comments Download
M gpu/config/gpu_info_collector.cc View 1 2 3 4 5 4 chunks +17 lines, -1 line 0 comments Download
M gpu/ipc/common/gpu_info.mojom View 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/ipc/common/gpu_info_struct_traits.h View 1 2 3 4 5 1 chunk +14 lines, -0 lines 0 comments Download
M gpu/ipc/common/gpu_info_struct_traits.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M gpu/ipc/common/gpu_param_traits_macros.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/ipc/common/struct_traits_unittest.cc View 1 2 3 4 3 chunks +12 lines, -0 lines 0 comments Download
M gpu/ipc/service/gpu_channel_manager.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M gpu/ipc/service/gpu_command_buffer_stub.cc View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M media/gpu/avda_picture_buffer_manager.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M ui/base/BUILD.gn View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M ui/base/x/x11_util.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +93 lines, -50 lines 0 comments Download
M ui/base/x/x11_util_internal.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +62 lines, -6 lines 0 comments Download
D ui/base/x/x11_util_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -36 lines 0 comments Download
M ui/gfx/x/x11_switches.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M ui/gfx/x/x11_switches.cc View 1 2 3 1 chunk +0 lines, -7 lines 0 comments Download
M ui/gfx/x/x11_types.h View 1 2 chunks +1 line, -1 line 0 comments Download
M ui/gl/BUILD.gn View 1 2 3 4 5 6 2 chunks +4 lines, -0 lines 0 comments Download
M ui/gl/DEPS View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M ui/gl/gl_context.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M ui/gl/gl_share_group.h View 1 2 3 4 5 6 4 chunks +6 lines, -5 lines 0 comments Download
M ui/gl/gl_share_group.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +18 lines, -9 lines 0 comments Download
M ui/gl/gl_surface.h View 1 2 3 4 5 6 2 chunks +5 lines, -0 lines 0 comments Download
M ui/gl/gl_surface.cc View 1 2 3 4 5 6 2 chunks +8 lines, -0 lines 0 comments Download
M ui/gl/gl_surface_egl.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +12 lines, -23 lines 0 comments Download
M ui/gl/gl_surface_glx.h View 1 2 3 4 5 6 4 chunks +6 lines, -0 lines 0 comments Download
M ui/gl/gl_surface_glx.cc View 1 2 3 4 5 6 9 chunks +33 lines, -11 lines 0 comments Download
A ui/gl/gl_visual_picker_glx.h View 1 2 3 4 1 chunk +64 lines, -0 lines 0 comments Download
A ui/gl/gl_visual_picker_glx.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +169 lines, -0 lines 0 comments Download
M ui/views/test/views_test_base.cc View 1 2 3 4 5 6 2 chunks +7 lines, -5 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 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 1 chunk +22 lines, -17 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 95 (68 generated)
Tom (Use chromium acct)
From the git-cl owners: watk: media/gpu/avda_picture_buffer_manager.cc calamity: extensions/browser/api/app_window/app_window_apitest.cc sadrul: ui/base/x/x11_util.cc ui/base/x/x11_util_internal.h ui/base/x/x11_util_unittest.cc ui/gfx/x/x11_switches.cc ui/gfx/x/x11_switches.h ui/gfx/x/x11_types.h ...
4 years, 3 months ago (2016-09-22 19:53:29 UTC) #30
watk
media/ lgtm
4 years, 3 months ago (2016-09-22 20:13:13 UTC) #31
piman
https://codereview.chromium.org/2347383002/diff/180001/content/browser/gpu/gpu_data_manager_impl_private.cc File content/browser/gpu/gpu_data_manager_impl_private.cc (right): https://codereview.chromium.org/2347383002/diff/180001/content/browser/gpu/gpu_data_manager_impl_private.cc#newcode1180 content/browser/gpu/gpu_data_manager_impl_private.cc:1180: ui::XVisualManager::GetInstance()->OnGPUInfoChanged( This function is called on the IO thread ...
4 years, 3 months ago (2016-09-22 21:24:55 UTC) #34
Tom (Use chromium acct)
https://codereview.chromium.org/2347383002/diff/180001/content/browser/gpu/gpu_data_manager_impl_private.cc File content/browser/gpu/gpu_data_manager_impl_private.cc (right): https://codereview.chromium.org/2347383002/diff/180001/content/browser/gpu/gpu_data_manager_impl_private.cc#newcode1180 content/browser/gpu/gpu_data_manager_impl_private.cc:1180: ui::XVisualManager::GetInstance()->OnGPUInfoChanged( On 2016/09/22 21:24:54, piman OOO back 2016-09-12 wrote: ...
4 years, 3 months ago (2016-09-23 20:00:38 UTC) #36
piman
https://codereview.chromium.org/2347383002/diff/180001/content/browser/gpu/gpu_data_manager_impl_private.cc File content/browser/gpu/gpu_data_manager_impl_private.cc (right): https://codereview.chromium.org/2347383002/diff/180001/content/browser/gpu/gpu_data_manager_impl_private.cc#newcode1180 content/browser/gpu/gpu_data_manager_impl_private.cc:1180: ui::XVisualManager::GetInstance()->OnGPUInfoChanged( On 2016/09/23 20:00:37, Tom Anderson wrote: > On ...
4 years, 2 months ago (2016-09-26 21:13:29 UTC) #45
Tom (Use chromium acct)
On 2016/09/26 21:13:29, piman OOO back 2016-09-26 wrote: > https://codereview.chromium.org/2347383002/diff/180001/content/browser/gpu/gpu_data_manager_impl_private.cc > File content/browser/gpu/gpu_data_manager_impl_private.cc (right): > ...
4 years, 2 months ago (2016-09-27 00:20:02 UTC) #47
piman
On Mon, Sep 26, 2016 at 5:20 PM, <thomasanderson@google.com> wrote: > On 2016/09/26 21:13:29, piman ...
4 years, 2 months ago (2016-09-27 01:06:32 UTC) #49
calamity
extensions/browser/api/app_window/app_window_apitest.cc lgtm.
4 years, 2 months ago (2016-09-27 01:10:25 UTC) #50
Tom (Use chromium acct)
On 2016/09/27 01:06:32, piman OOO back 2016-09-26 wrote: > > It's probably a matter of ...
4 years, 2 months ago (2016-09-27 18:57:31 UTC) #54
piman
LGTM, thanks for working through this!
4 years, 2 months ago (2016-09-27 19:39:04 UTC) #57
Tom (Use chromium acct)
Pinging sadrul@ and dcheng@ for sadrul: ui/base/x/x11_util.cc ui/base/x/x11_util_internal.h ui/base/x/x11_util_unittest.cc ui/gfx/x/x11_switches.cc ui/gfx/x/x11_switches.h ui/gfx/x/x11_types.h ui/views/test/views_test_base.cc ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ...
4 years, 2 months ago (2016-09-27 22:36:58 UTC) #60
dcheng
https://codereview.chromium.org/2347383002/diff/260001/gpu/config/gpu_info.h File gpu/config/gpu_info.h (right): https://codereview.chromium.org/2347383002/diff/260001/gpu/config/gpu_info.h#newcode245 gpu/config/gpu_info.h:245: VisualID rgba_visual; Just to help me understand: the GPU ...
4 years, 2 months ago (2016-09-27 23:25:51 UTC) #61
Tom (Use chromium acct)
https://codereview.chromium.org/2347383002/diff/260001/gpu/config/gpu_info.h File gpu/config/gpu_info.h (right): https://codereview.chromium.org/2347383002/diff/260001/gpu/config/gpu_info.h#newcode245 gpu/config/gpu_info.h:245: VisualID rgba_visual; On 2016/09/27 23:25:51, dcheng wrote: > Just ...
4 years, 2 months ago (2016-09-27 23:47:49 UTC) #62
dcheng
On 2016/09/27 23:47:49, Tom Anderson wrote: > https://codereview.chromium.org/2347383002/diff/260001/gpu/config/gpu_info.h > File gpu/config/gpu_info.h (right): > > https://codereview.chromium.org/2347383002/diff/260001/gpu/config/gpu_info.h#newcode245 ...
4 years, 2 months ago (2016-09-28 00:08:04 UTC) #63
sadrul
lgtm https://codereview.chromium.org/2347383002/diff/260001/ui/base/x/x11_util_internal.h File ui/base/x/x11_util_internal.h (right): https://codereview.chromium.org/2347383002/diff/260001/ui/base/x/x11_util_internal.h#newcode107 ui/base/x/x11_util_internal.h:107: bool have_gpu_argb_visual_; DISALLOW_COPY_AND_ASSIGN
4 years, 2 months ago (2016-09-28 03:56:32 UTC) #64
Julien Isorce Samsung
Hi Tom, thx a lot for all of it. FWIW, non-owner LGTM ! https://codereview.chromium.org/2347383002/diff/260001/content/browser/gpu/gpu_data_manager_impl_private.cc File ...
4 years, 2 months ago (2016-09-28 17:42:52 UTC) #65
Tom (Use chromium acct)
https://codereview.chromium.org/2347383002/diff/260001/content/browser/gpu/gpu_data_manager_impl_private.cc File content/browser/gpu/gpu_data_manager_impl_private.cc (right): https://codereview.chromium.org/2347383002/diff/260001/content/browser/gpu/gpu_data_manager_impl_private.cc#newcode56 content/browser/gpu/gpu_data_manager_impl_private.cc:56: On 2016/09/28 17:42:51, Julien Isorce wrote: > Left over ...
4 years, 2 months ago (2016-09-28 18:36:01 UTC) #69
dcheng
https://codereview.chromium.org/2347383002/diff/280001/ui/base/x/x11_util.cc File ui/base/x/x11_util.cc (right): https://codereview.chromium.org/2347383002/diff/280001/ui/base/x/x11_util.cc#newcode1492 ui/base/x/x11_util.cc:1492: if (system_visual_id && visuals_.find(system_visual_id) != visuals_.end()) Would you ever ...
4 years, 2 months ago (2016-09-28 22:16:46 UTC) #72
dcheng
+rockot for real I talked with rockot@ offline, and he mentioned that nullable substructures might ...
4 years, 2 months ago (2016-09-28 23:12:11 UTC) #73
Tom (Use chromium acct)
dcheng@ PTAL at the deltas On 2016/09/28 22:16:46, dcheng wrote: > https://codereview.chromium.org/2347383002/diff/280001/ui/base/x/x11_util.cc > File ui/base/x/x11_util.cc ...
4 years, 2 months ago (2016-09-29 23:24:49 UTC) #76
dcheng
ipc changes lgtm, thanks https://codereview.chromium.org/2347383002/diff/300001/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): https://codereview.chromium.org/2347383002/diff/300001/content/browser/browser_main_loop.cc#newcode390 content/browser/browser_main_loop.cc:390: auto gpu_process_host = GpuProcessHost::Get( Nit: ...
4 years, 2 months ago (2016-09-30 02:40:49 UTC) #79
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2347383002/320001
4 years, 2 months ago (2016-09-30 23:46:48 UTC) #87
commit-bot: I haz the power
Committed patchset #13 (id:320001)
4 years, 2 months ago (2016-10-01 02:04:03 UTC) #89
commit-bot: I haz the power
Patchset 13 (id:??) landed as https://crrev.com/62ba78ffcdf525eb9ed640724e640fcf22fbbf87 Cr-Commit-Position: refs/heads/master@{#422274}
4 years, 2 months ago (2016-10-01 02:06:33 UTC) #91
hubbe
This CL means that chrome doesn't work on my desktop anymore. I do not have ...
4 years, 2 months ago (2016-10-03 19:57:31 UTC) #93
hubbe
On 2016/10/03 19:57:31, hubbe wrote: > This CL means that chrome doesn't work on my ...
4 years, 2 months ago (2016-10-03 19:58:10 UTC) #94
Tom (Use chromium acct)
4 years, 2 months ago (2016-10-03 20:09:56 UTC) #95
Message was sent while issue was closed.
On 2016/10/03 19:57:31, hubbe wrote:
> This CL means that chrome doesn't work on my desktop anymore.
> I do not have any transparent visuals because my desktop is configured for
> 10-bit output. Please make this work or revert this CL.

Speculative fix here: https://codereview.chromium.org/2386313002/
hubbe@ Can you try applying locally and see if that fixes it?

Powered by Google App Engine
This is Rietveld 408576698