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

Issue 291473002: ozone: Initialize a subsystem only if necessary. (Closed)

Created:
6 years, 7 months ago by sadrul
Modified:
6 years, 7 months ago
Reviewers:
rjkroege, kalyank, spang, piman
CC:
chromium-reviews, rjkroege, ozone-reviews_chromium.org, tdanderson+views_chromium.org, ben+aura_chromium.org, tdresser+watch_chromium.org, tfarina, jam, darin-cc_chromium.org, kalyank, ben+views_chromium.org
Visibility:
Public.

Description

ozone: Initialize a subsystem only if necessary. Some of the ozone subsystems don't need to be initialized in the GPU process (e.g. events). So let the ozone-platform know what process the platform is being initialized for, and initialize only the subsystems that make sense for that process. The changes include: * Remove SetInstance() from EventFactoryOzone, SurfaceFactoryOzone and CursorFactoryOzone. Instead, set the instance from the constructor. * Require the platforms to provide one explicit constructor for the UI and GPU processes through the OzonePlatform interface. * Do not initialize any of the sub-systems in InitializeGPU() in all platforms. * Move the initialization of ozone-platform into aura::Env::Init. * Move the creation of udev-monitor in DeviceManagerUdev from the constructor to ScanDevices(), since it needs the message-loop, and the message-loop is constructed later. * Update EventFactoryEvdev to set the ui_task_runner_ from OnDispatcherListChanged(), since this too is created before the message-loop. BUG=361137 R=piman@chromium.org TBR=spang@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270903

Patch Set 1 #

Total comments: 2

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : tot-merge-r270817 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+193 lines, -126 lines) Patch
M content/browser/browser_main_loop.cc View 2 chunks +0 lines, -8 lines 0 comments Download
M content/browser/compositor/software_output_device_ozone_unittest.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M ui/aura/env.cc View 2 chunks +9 lines, -0 lines 0 comments Download
M ui/aura/window_tree_host_ozone.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M ui/base/cursor/ozone/cursor_factory_ozone.h View 1 chunk +1 line, -4 lines 0 comments Download
M ui/base/cursor/ozone/cursor_factory_ozone.cc View 1 chunk +8 lines, -4 lines 0 comments Download
M ui/events/ozone/device/udev/device_manager_udev.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M ui/events/ozone/device/udev/device_manager_udev.cc View 1 2 chunks +11 lines, -5 lines 0 comments Download
M ui/events/ozone/evdev/event_factory_evdev.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M ui/events/ozone/evdev/event_factory_evdev.cc View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download
M ui/events/ozone/event_factory_ozone.h View 1 1 chunk +1 line, -4 lines 0 comments Download
M ui/events/ozone/event_factory_ozone.cc View 1 1 chunk +8 lines, -4 lines 0 comments Download
M ui/gfx/ozone/surface_factory_ozone.h View 1 chunk +1 line, -4 lines 0 comments Download
M ui/gfx/ozone/surface_factory_ozone.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M ui/gl/gl_implementation_ozone.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/ozone/ozone_platform.h View 1 2 2 chunks +11 lines, -3 lines 0 comments Download
M ui/ozone/ozone_platform.cc View 1 2 3 2 chunks +24 lines, -18 lines 0 comments Download
M ui/ozone/platform/caca/ozone_platform_caca.cc View 1 2 chunks +20 lines, -11 lines 0 comments Download
M ui/ozone/platform/dri/ozone_platform_dri.cc View 1 2 chunks +28 lines, -18 lines 0 comments Download
M ui/ozone/platform/egltest/ozone_platform_egltest.cc View 1 2 3 3 chunks +22 lines, -13 lines 0 comments Download
M ui/ozone/platform/test/ozone_platform_test.cc View 1 2 3 1 chunk +29 lines, -19 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_screen_ozone.cc View 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
sadrul
I am returning NULL from all CreateOzonePlatform*ForGPU() implementations for now. This crashes the GPU process ...
6 years, 7 months ago (2014-05-15 19:00:50 UTC) #1
kalyank
https://codereview.chromium.org/291473002/diff/1/ui/ozone/ozone_platform.cc File ui/ozone/ozone_platform.cc (right): https://codereview.chromium.org/291473002/diff/1/ui/ozone/ozone_platform.cc#newcode64 ui/ozone/ozone_platform.cc:64: ui::InputMethodContextFactoryOzone::SetInstance( shouldn't we do the same with this. It ...
6 years, 7 months ago (2014-05-15 19:21:45 UTC) #2
sadrul
https://codereview.chromium.org/291473002/diff/1/ui/ozone/ozone_platform.cc File ui/ozone/ozone_platform.cc (right): https://codereview.chromium.org/291473002/diff/1/ui/ozone/ozone_platform.cc#newcode64 ui/ozone/ozone_platform.cc:64: ui::InputMethodContextFactoryOzone::SetInstance( On 2014/05/15 19:21:45, kalyank wrote: > shouldn't we ...
6 years, 7 months ago (2014-05-15 19:27:24 UTC) #3
spang
On 2014/05/15 19:27:24, sadrul wrote: > https://codereview.chromium.org/291473002/diff/1/ui/ozone/ozone_platform.cc > File ui/ozone/ozone_platform.cc (right): > > https://codereview.chromium.org/291473002/diff/1/ui/ozone/ozone_platform.cc#newcode64 > ...
6 years, 7 months ago (2014-05-15 19:53:56 UTC) #4
sadrul
On 2014/05/15 19:53:56, spang wrote: > On 2014/05/15 19:27:24, sadrul wrote: > > https://codereview.chromium.org/291473002/diff/1/ui/ozone/ozone_platform.cc > ...
6 years, 7 months ago (2014-05-15 20:23:25 UTC) #5
sadrul
On 2014/05/15 20:23:25, sadrul wrote: > On 2014/05/15 19:53:56, spang wrote: > > On 2014/05/15 ...
6 years, 7 months ago (2014-05-15 20:55:09 UTC) #6
sadrul
+piman@ for changes in content/browser/ and ui/gl/
6 years, 7 months ago (2014-05-15 20:56:07 UTC) #7
piman
LGTM. Keep in mind that in some configurations (e.g. tests) both "GPU" and "UI" can ...
6 years, 7 months ago (2014-05-15 21:35:54 UTC) #8
sadrul
I have addressed spang's concern in the CL. Landing this to unblock https://codereview.chromium.org/285303004/ (and another ...
6 years, 7 months ago (2014-05-16 02:28:15 UTC) #9
sadrul
6 years, 7 months ago (2014-05-16 02:29:32 UTC) #10
Message was sent while issue was closed.
Committed patchset #4 manually as r270903 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698