Index: ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc |
diff --git a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc |
index ff3222e44199fde4a7fa034d8d1c872d47e06e35..7c7b0bfc710428cec3d2a9ebd1ff2661e57e9eee 100644 |
--- a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc |
+++ b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc |
@@ -95,7 +95,7 @@ bool HardwareDisplayPlaneManager::Initialize(DrmDevice* drm) { |
} |
plane_ids.insert(drm_plane->plane_id); |
scoped_ptr<HardwareDisplayPlane> plane( |
- new HardwareDisplayPlane(drm_plane.Pass())); |
+ CreatePlane(drm_plane->plane_id, drm_plane->possible_crtcs)); |
if (plane->Initialize(drm)) |
planes_.push_back(plane.release()); |
} |
@@ -107,7 +107,7 @@ bool HardwareDisplayPlaneManager::Initialize(DrmDevice* drm) { |
for (int i = 0; i < resources->count_crtcs; ++i) { |
if (plane_ids.find(resources->crtcs[i] - 1) == plane_ids.end()) { |
scoped_ptr<HardwareDisplayPlane> dummy_plane( |
- new HardwareDisplayPlane(0, (1 << i))); |
+ CreatePlane(resources->crtcs[i] - 1, (1 << i))); |
dummy_plane->set_is_dummy(true); |
if (dummy_plane->Initialize(drm)) |
planes_.push_back(dummy_plane.release()); |
@@ -121,6 +121,13 @@ bool HardwareDisplayPlaneManager::Initialize(DrmDevice* drm) { |
return true; |
} |
+scoped_ptr<HardwareDisplayPlane> HardwareDisplayPlaneManager::CreatePlane( |
+ uint32_t plane_id, |
+ uint32_t possible_crtcs) { |
+ return scoped_ptr<HardwareDisplayPlane>( |
+ new HardwareDisplayPlane(plane_id, possible_crtcs)); |
+} |
+ |
HardwareDisplayPlane* HardwareDisplayPlaneManager::FindNextUnusedPlane( |
size_t* index, |
uint32_t crtc_index) { |