| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/ozone/platform/drm/gpu/hardware_display_plane_manager.h" | 5 #include "ui/ozone/platform/drm/gpu/hardware_display_plane_manager.h" |
| 6 | 6 |
| 7 #include <drm.h> | 7 #include <drm.h> |
| 8 #include <xf86drm.h> | 8 #include <xf86drm.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 } // namespace | 25 } // namespace |
| 26 | 26 |
| 27 HardwareDisplayPlaneList::HardwareDisplayPlaneList() { | 27 HardwareDisplayPlaneList::HardwareDisplayPlaneList() { |
| 28 #if defined(USE_DRM_ATOMIC) | 28 #if defined(USE_DRM_ATOMIC) |
| 29 atomic_property_set.reset(drmModePropertySetAlloc()); | 29 atomic_property_set.reset(drmModePropertySetAlloc()); |
| 30 #endif // defined(USE_DRM_ATOMIC) | 30 #endif // defined(USE_DRM_ATOMIC) |
| 31 } | 31 } |
| 32 | 32 |
| 33 HardwareDisplayPlaneList::~HardwareDisplayPlaneList() { | 33 HardwareDisplayPlaneList::~HardwareDisplayPlaneList() { |
| 34 for (auto* plane : plane_list) { | |
| 35 plane->set_in_use(false); | |
| 36 plane->set_owning_crtc(0); | |
| 37 } | |
| 38 for (auto* plane : old_plane_list) { | |
| 39 plane->set_in_use(false); | |
| 40 plane->set_owning_crtc(0); | |
| 41 } | |
| 42 } | 34 } |
| 43 | 35 |
| 44 HardwareDisplayPlaneList::PageFlipInfo::PageFlipInfo(uint32_t crtc_id, | 36 HardwareDisplayPlaneList::PageFlipInfo::PageFlipInfo(uint32_t crtc_id, |
| 45 uint32_t framebuffer, | 37 uint32_t framebuffer, |
| 46 CrtcController* crtc) | 38 CrtcController* crtc) |
| 47 : crtc_id(crtc_id), framebuffer(framebuffer), crtc(crtc) { | 39 : crtc_id(crtc_id), framebuffer(framebuffer), crtc(crtc) { |
| 48 } | 40 } |
| 49 | 41 |
| 50 HardwareDisplayPlaneList::PageFlipInfo::~PageFlipInfo() { | 42 HardwareDisplayPlaneList::PageFlipInfo::~PageFlipInfo() { |
| 51 } | 43 } |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 if (plane->owning_crtc() == crtc_id) { | 229 if (plane->owning_crtc() == crtc_id) { |
| 238 plane->set_owning_crtc(0); | 230 plane->set_owning_crtc(0); |
| 239 plane->set_in_use(false); | 231 plane->set_in_use(false); |
| 240 } else { | 232 } else { |
| 241 plane_list->old_plane_list.push_back(plane); | 233 plane_list->old_plane_list.push_back(plane); |
| 242 } | 234 } |
| 243 } | 235 } |
| 244 } | 236 } |
| 245 | 237 |
| 246 } // namespace ui | 238 } // namespace ui |
| OLD | NEW |