| Index: ui/ozone/platform/drm/host/drm_display_host_manager.cc
|
| diff --git a/ui/ozone/platform/drm/host/drm_display_host_manager.cc b/ui/ozone/platform/drm/host/drm_display_host_manager.cc
|
| index 0e7085450396da04388d80f209c91e7b4857caef..17b959cd514706ad7cb6d71a722066fa3342fb5e 100644
|
| --- a/ui/ozone/platform/drm/host/drm_display_host_manager.cc
|
| +++ b/ui/ozone/platform/drm/host/drm_display_host_manager.cc
|
| @@ -306,28 +306,7 @@ void DrmDisplayHostManager::OnRemoveGraphicsDevice(
|
| ProcessEvent();
|
| }
|
|
|
| -void DrmDisplayHostManager::OnGpuThreadReady() {
|
| - // If in the middle of a configuration, just respond with the old list of
|
| - // displays. This is fine, since after the DRM resources are initialized and
|
| - // IPC-ed to the GPU NotifyDisplayDelegate() is called to let the display
|
| - // delegate know that the display configuration changed and it needs to
|
| - // update it again.
|
| - if (!get_displays_callback_.is_null()) {
|
| - base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| - FROM_HERE,
|
| - base::Bind(&DrmDisplayHostManager::RunUpdateDisplaysCallback,
|
| - weak_ptr_factory_.GetWeakPtr(), get_displays_callback_));
|
| - get_displays_callback_.Reset();
|
| - }
|
| -
|
| - // Signal that we're taking DRM master since we're going through the
|
| - // initialization process again and we'll take all the available resources.
|
| - if (!take_display_control_callback_.is_null())
|
| - GpuTookDisplayControl(true);
|
| -
|
| - if (!relinquish_display_control_callback_.is_null())
|
| - GpuRelinquishedDisplayControl(false);
|
| -
|
| +void DrmDisplayHostManager::OnGpuProcessLaunched() {
|
| std::unique_ptr<DrmDeviceHandle> handle =
|
| std::move(primary_drm_device_handle_);
|
| {
|
| @@ -349,6 +328,29 @@ void DrmDisplayHostManager::OnGpuThreadReady() {
|
| // state.
|
| proxy_->GpuAddGraphicsDevice(drm_devices_[primary_graphics_card_path_],
|
| base::FileDescriptor(handle->PassFD()));
|
| +}
|
| +
|
| +void DrmDisplayHostManager::OnGpuThreadReady() {
|
| + // If in the middle of a configuration, just respond with the old list of
|
| + // displays. This is fine, since after the DRM resources are initialized and
|
| + // IPC-ed to the GPU NotifyDisplayDelegate() is called to let the display
|
| + // delegate know that the display configuration changed and it needs to
|
| + // update it again.
|
| + if (!get_displays_callback_.is_null()) {
|
| + base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&DrmDisplayHostManager::RunUpdateDisplaysCallback,
|
| + weak_ptr_factory_.GetWeakPtr(), get_displays_callback_));
|
| + get_displays_callback_.Reset();
|
| + }
|
| +
|
| + // Signal that we're taking DRM master since we're going through the
|
| + // initialization process again and we'll take all the available resources.
|
| + if (!take_display_control_callback_.is_null())
|
| + GpuTookDisplayControl(true);
|
| +
|
| + if (!relinquish_display_control_callback_.is_null())
|
| + GpuRelinquishedDisplayControl(false);
|
|
|
| device_manager_->ScanDevices(this);
|
| NotifyDisplayDelegate();
|
|
|