diff options
author | achaulk <achaulk@chromium.org> | 2015-03-18 14:24:28 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-18 21:25:05 +0000 |
commit | 10660cc12bd27506a1353a9a04105c512f410eec (patch) | |
tree | 578669a2fc4638c53a935abe9e0597e3a2436501 /ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc | |
parent | 6b17596fa2ed2f842e3f3d262f0e4bbab68ec50f (diff) | |
download | chromium_src-10660cc12bd27506a1353a9a04105c512f410eec.zip chromium_src-10660cc12bd27506a1353a9a04105c512f410eec.tar.gz chromium_src-10660cc12bd27506a1353a9a04105c512f410eec.tar.bz2 |
ozone: Preliminary atomic patch
Adds atomic plane, plane manager and define to enable
Currently only in the GN build and disabled - no platforms support the ioctl so there's no reason to enable it anywhere
Review URL: https://codereview.chromium.org/994503004
Cr-Commit-Position: refs/heads/master@{#321207}
Diffstat (limited to 'ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc')
-rw-r--r-- | ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc | 11 |
1 files changed, 9 insertions, 2 deletions
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 ff3222e..7c7b0bf 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) { |