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

Issue 2914103002: Remove usages of XInternAtom (Closed)

Created:
3 years, 6 months ago by Tom Anderson
Modified:
3 years, 6 months ago
Reviewers:
Elliot Glaysher, sadrul, sky
CC:
chromium-reviews, sadrul, yusukes+watch_chromium.org, derat+watch_chromium.org, chromoting-reviews_chromium.org, chfremer+watch_chromium.org, dcheng, feature-media-reviews_chromium.org, oshima+watch_chromium.org, piman+watch_chromium.org, kalyank, tfarina
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove usages of XInternAtom Previously, there were multiple places in Chrome where ui::GetAtom or XInternAtom was used without caching. This requires a blocking round-trip to the X server for each of these. Other code used X11AtomCache. However, there were multiple separate caches which each require a round-trip on construction. This CL makes X11AtomCache a singleton. There will be only a single round-trip to get all atoms on browser startup. This CL: * Replaces most usage of XInternAtom(s) with ui::GetAtom or ui::X11AtomCache::GetAtom() * Makes ui::GetAtom use X11AtomCache * Makes X11AtomCache a singleton * Previously there were separate caches, many of which had duplicate atoms. This change consolidates them into one place. * Adds a PRESUBMIT warning to prevent usage of XInternAtom CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;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 BUG=730889 Review-Url: https://codereview.chromium.org/2914103002 Cr-Commit-Position: refs/heads/master@{#477836} Committed: https://chromium.googlesource.com/chromium/src/+/e043e3ceedef5d2ab6eb984d8f0a627989abad3e

Patch Set 1 #

Total comments: 17

Patch Set 2 : Address sadrul and sergeyu comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+461 lines, -707 lines) Patch
M PRESUBMIT.py View 1 1 chunk +11 lines, -0 lines 0 comments Download
M ash/host/ash_window_tree_host_x11.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/media/webrtc/window_icon_util_x11.cc View 2 chunks +2 lines, -1 line 0 comments Download
M ui/aura/test/ui_controls_factory_aurax11.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/aura/window_tree_host_x11.h View 3 chunks +0 lines, -4 lines 0 comments Download
M ui/aura/window_tree_host_x11.cc View 5 chunks +8 lines, -23 lines 0 comments Download
M ui/base/clipboard/clipboard_aurax11.cc View 1 15 chunks +16 lines, -47 lines 0 comments Download
M ui/base/dragdrop/os_exchange_data_provider_aurax11.h View 2 chunks +0 lines, -3 lines 0 comments Download
M ui/base/dragdrop/os_exchange_data_provider_aurax11.cc View 23 chunks +44 lines, -68 lines 0 comments Download
M ui/base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M ui/base/x/selection_owner.h View 2 chunks +0 lines, -3 lines 0 comments Download
M ui/base/x/selection_owner.cc View 6 chunks +9 lines, -23 lines 0 comments Download
M ui/base/x/selection_requestor.h View 2 chunks +0 lines, -3 lines 0 comments Download
M ui/base/x/selection_requestor.cc View 3 chunks +3 lines, -10 lines 0 comments Download
M ui/base/x/selection_requestor_unittest.cc View 7 chunks +11 lines, -31 lines 0 comments Download
M ui/base/x/selection_utils.h View 2 chunks +3 lines, -10 lines 0 comments Download
M ui/base/x/selection_utils.cc View 5 chunks +18 lines, -40 lines 0 comments Download
M ui/base/x/x11_util.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M ui/display/manager/chromeos/x11/native_display_delegate_x11.cc View 5 chunks +10 lines, -12 lines 0 comments Download
M ui/display/util/x11/edid_parser_x11.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M ui/events/devices/x11/device_data_manager_x11.h View 2 chunks +0 lines, -4 lines 0 comments Download
M ui/events/devices/x11/device_data_manager_x11.cc View 4 chunks +4 lines, -3 lines 0 comments Download
M ui/events/platform/x11/x11_event_source.cc View 2 chunks +2 lines, -1 line 0 comments Download
M ui/events/platform/x11/x11_hotplug_event_handler.h View 2 chunks +0 lines, -3 lines 0 comments Download
M ui/events/platform/x11/x11_hotplug_event_handler.cc View 7 chunks +12 lines, -24 lines 0 comments Download
M ui/gfx/icc_profile_x11.cc View 2 chunks +2 lines, -1 line 0 comments Download
M ui/gfx/x/x11_atom_cache.h View 2 chunks +11 lines, -9 lines 0 comments Download
M ui/gfx/x/x11_atom_cache.cc View 1 2 chunks +154 lines, -9 lines 0 comments Download
M ui/platform_window/x11/x11_window_base.h View 2 chunks +0 lines, -2 lines 0 comments Download
M ui/platform_window/x11/x11_window_base.cc View 7 chunks +9 lines, -14 lines 0 comments Download
M ui/views/test/ui_controls_factory_desktop_aurax11.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/test/x11_property_change_waiter.h View 2 chunks +0 lines, -3 lines 0 comments Download
M ui/views/test/x11_property_change_waiter.cc View 2 chunks +3 lines, -9 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h View 2 chunks +0 lines, -3 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc View 23 chunks +38 lines, -83 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11_unittest.cc View 6 chunks +5 lines, -22 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_screen_x11.h View 2 chunks +0 lines, -3 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_screen_x11.cc View 5 chunks +4 lines, -11 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h View 2 chunks +0 lines, -3 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc View 24 chunks +53 lines, -131 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc View 8 chunks +9 lines, -43 lines 0 comments Download
M ui/views/widget/desktop_aura/x11_desktop_handler.h View 2 chunks +0 lines, -3 lines 0 comments Download
M ui/views/widget/desktop_aura/x11_desktop_handler.cc View 3 chunks +2 lines, -9 lines 0 comments Download
M ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc View 4 chunks +4 lines, -14 lines 0 comments Download
M ui/views/widget/desktop_aura/x11_window_event_filter.h View 2 chunks +0 lines, -3 lines 0 comments Download
M ui/views/widget/desktop_aura/x11_window_event_filter.cc View 4 chunks +2 lines, -7 lines 0 comments Download

Messages

Total messages: 71 (58 generated)
Tom Anderson
reviewers ptal From 'git cl owners': erg owns 16 file(s): ui/aura/test/ui_controls_factory_aurax11.cc [15] ui/aura/window_tree_host_x11.cc [15] ui/aura/window_tree_host_x11.h ...
3 years, 6 months ago (2017-06-01 19:58:45 UTC) #36
Sergey Ulanov
https://codereview.chromium.org/2914103002/diff/160001/remoting/host/linux/x_server_clipboard.cc File remoting/host/linux/x_server_clipboard.cc (right): https://codereview.chromium.org/2914103002/diff/160001/remoting/host/linux/x_server_clipboard.cc#newcode59 remoting/host/linux/x_server_clipboard.cc:59: clipboard_atom_ = ui::GetAtom("CLIPLBOARD"); This uses a different X connection, ...
3 years, 6 months ago (2017-06-01 20:40:09 UTC) #38
sadrul
https://codereview.chromium.org/2914103002/diff/160001/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/2914103002/diff/160001/PRESUBMIT.py#newcode194 PRESUBMIT.py:194: 'Use ui::GetAtom() or ui::X11AtomCache::GetAtom() instead of', Can we actually ...
3 years, 6 months ago (2017-06-01 20:45:31 UTC) #39
Tom Anderson
https://codereview.chromium.org/2914103002/diff/160001/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/2914103002/diff/160001/PRESUBMIT.py#newcode194 PRESUBMIT.py:194: 'Use ui::GetAtom() or ui::X11AtomCache::GetAtom() instead of', On 2017/06/01 20:45:30, ...
3 years, 6 months ago (2017-06-01 21:20:43 UTC) #40
Tom Anderson
ping
3 years, 6 months ago (2017-06-05 23:14:00 UTC) #46
Elliot Glaysher
//ui/{aura,views}/ lgtm
3 years, 6 months ago (2017-06-06 19:20:02 UTC) #49
sadrul
lgtm https://codereview.chromium.org/2914103002/diff/160001/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/2914103002/diff/160001/PRESUBMIT.py#newcode194 PRESUBMIT.py:194: 'Use ui::GetAtom() or ui::X11AtomCache::GetAtom() instead of', On 2017/06/01 ...
3 years, 6 months ago (2017-06-07 17:32:40 UTC) #51
Tom Anderson
On 2017/06/07 17:32:40, sadrul wrote: > lgtm > > https://codereview.chromium.org/2914103002/diff/160001/PRESUBMIT.py > File PRESUBMIT.py (right): > ...
3 years, 6 months ago (2017-06-07 18:43:14 UTC) #52
sky
Rubber stamp LGTM
3 years, 6 months ago (2017-06-07 19:49:56 UTC) #53
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/2914103002/180001
3 years, 6 months ago (2017-06-07 19:52:14 UTC) #55
commit-bot: I haz the power
Try jobs failed on following builders: win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/245413)
3 years, 6 months ago (2017-06-07 19:55:37 UTC) #57
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/2914103002/180001
3 years, 6 months ago (2017-06-08 00:36:16 UTC) #68
commit-bot: I haz the power
3 years, 6 months ago (2017-06-08 00:43:43 UTC) #71
Message was sent while issue was closed.
Committed patchset #2 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/e043e3ceedef5d2ab6eb984d8f0a...

Powered by Google App Engine
This is Rietveld 408576698