| 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 93d43e2467de430ae2cec6ce1655f6eb33dd403d..2feb1f4bae102cf2ac87b537968f936f19efce58 100644
|
| --- a/ui/ozone/platform/drm/host/drm_display_host_manager.cc
|
| +++ b/ui/ozone/platform/drm/host/drm_display_host_manager.cc
|
| @@ -13,12 +13,12 @@
|
| #include "base/thread_task_runner_handle.h"
|
| #include "base/threading/thread_restrictions.h"
|
| #include "base/threading/worker_pool.h"
|
| -#include "ui/display/types/display_snapshot.h"
|
| #include "ui/events/ozone/device/device_event.h"
|
| #include "ui/events/ozone/device/device_manager.h"
|
| #include "ui/ozone/common/display_snapshot_proxy.h"
|
| #include "ui/ozone/common/display_util.h"
|
| #include "ui/ozone/common/gpu/ozone_gpu_messages.h"
|
| +#include "ui/ozone/platform/drm/common/drm_util.h"
|
| #include "ui/ozone/platform/drm/host/drm_device_handle.h"
|
| #include "ui/ozone/platform/drm/host/drm_gpu_platform_support_host.h"
|
| #include "ui/ozone/platform/drm/host/drm_native_display_delegate.h"
|
| @@ -122,27 +122,13 @@ DrmDisplayHostManager::DrmDisplayHostManager(DrmGpuPlatformSupportHost* proxy,
|
| device_manager_->AddObserver(this);
|
| proxy_->RegisterHandler(this);
|
|
|
| - DisplaySnapshot_Params params;
|
| - bool success = false;
|
| - {
|
| - // The file generated by frecon that contains EDID for the 1st display.
|
| - const base::FilePath kEDIDFile("/tmp/display_info.bin");
|
| -
|
| - // Just read it on current thread as this is necessary information
|
| - // to start. This access only tmpfs, which is fast.
|
| - // TODO(dnicoara|oshima): crbug.com/450886.
|
| - base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| - success = CreateSnapshotFromEDIDFile(kEDIDFile, ¶ms);
|
| - }
|
| -
|
| - // Fallback to command line if the file doesn't exit or failed to read.
|
| - if (success || CreateSnapshotFromCommandLine(¶ms)) {
|
| - LOG_IF(ERROR, !success) << "Failed to read display_info.bin.";
|
| - DCHECK_NE(DISPLAY_CONNECTION_TYPE_NONE, params.type);
|
| - displays_.push_back(new DisplaySnapshotProxy(params));
|
| - has_dummy_display_ = true;
|
| - } else {
|
| - LOG(ERROR) << "Failed to obtain initial display info";
|
| + DrmDeviceHandle* handle = drm_devices_.get(primary_graphics_card_path_);
|
| + ScopedVector<HardwareDisplayControllerInfo> display_infos =
|
| + GetAvailableDisplayControllerInfos(handle->fd());
|
| + has_dummy_display_ = !display_infos.empty();
|
| + for (size_t i = 0; i < display_infos.size(); ++i) {
|
| + displays_.push_back(new DisplaySnapshotProxy(CreateDisplaySnapshotParams(
|
| + display_infos[i], handle->fd(), i, gfx::Point())));
|
| }
|
| }
|
|
|
|
|