| Index: ui/ozone/platform/drm/gpu/drm_device.cc
|
| diff --git a/ui/ozone/platform/drm/gpu/drm_device.cc b/ui/ozone/platform/drm/gpu/drm_device.cc
|
| index 5f87095686efcd183a973db0edf420ecdfa05264..1b2ca332d579cfc7830c320f32ce588b2f24670c 100644
|
| --- a/ui/ozone/platform/drm/gpu/drm_device.cc
|
| +++ b/ui/ozone/platform/drm/gpu/drm_device.cc
|
| @@ -19,6 +19,9 @@
|
| #include "base/trace_event/trace_event.h"
|
| #include "third_party/skia/include/core/SkImageInfo.h"
|
| #include "ui/ozone/platform/drm/gpu/drm_util.h"
|
| +#if defined(OZONE_USE_ATOMIC)
|
| +#include "ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.h"
|
| +#endif
|
| #include "ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.h"
|
|
|
| namespace ui {
|
| @@ -199,7 +202,11 @@ bool DrmDevice::Initialize() {
|
| return false;
|
| }
|
|
|
| +#if defined(OZONE_USE_ATOMIC)
|
| + plane_manager_.reset(new HardwareDisplayPlaneManagerAtomic());
|
| +#else
|
| plane_manager_.reset(new HardwareDisplayPlaneManagerLegacy());
|
| +#endif
|
| if (!plane_manager_->Initialize(this)) {
|
| LOG(ERROR) << "Failed to initialize the plane manager for "
|
| << device_path_.value();
|
| @@ -439,6 +446,17 @@ void DrmDevice::DestroyDumbBuffer(const SkImageInfo& info,
|
| DrmDestroyDumbBuffer(file_.GetPlatformFile(), handle);
|
| }
|
|
|
| +bool DrmDevice::CommitProperties(drmModePropertySet* properties,
|
| + uint32_t flags,
|
| + void* user_ptr) {
|
| +#if defined(OZONE_USE_ATOMIC)
|
| + return drmModePropertySetCommit(file_.GetPlatformFile(), flags, user_ptr,
|
| + properties) == 0;
|
| +#else
|
| + return false;
|
| +#endif
|
| +}
|
| +
|
| bool DrmDevice::SetMaster() {
|
| DCHECK(file_.IsValid());
|
| return (drmSetMaster(file_.GetPlatformFile()) == 0);
|
|
|