| 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> |
| 11 | 11 |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "ui/gfx/geometry/rect.h" | 13 #include "ui/gfx/geometry/rect.h" |
| 14 #include "ui/ozone/platform/drm/gpu/crtc_controller.h" | 14 #include "ui/ozone/platform/drm/gpu/crtc_controller.h" |
| 15 #include "ui/ozone/platform/drm/gpu/drm_device.h" | 15 #include "ui/ozone/platform/drm/gpu/drm_device.h" |
| 16 #include "ui/ozone/platform/drm/gpu/hardware_display_controller.h" | 16 #include "ui/ozone/platform/drm/gpu/hardware_display_controller.h" |
| 17 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h" | 17 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h" |
| 18 #include "ui/ozone/public/ozone_switches.h" | 18 #include "ui/ozone/public/ozone_switches.h" |
| 19 | 19 |
| 20 namespace ui { | 20 namespace ui { |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 const float kFixedPointScaleValue = 65536.0f; | 23 const float kFixedPointScaleValue = 65536.0f; |
| 24 | 24 |
| 25 } // namespace | 25 } // namespace |
| 26 | 26 |
| 27 HardwareDisplayPlaneList::HardwareDisplayPlaneList() : committed(false) { | 27 HardwareDisplayPlaneList::HardwareDisplayPlaneList() : committed(false) { |
| 28 #if defined(USE_DRM_ATOMIC) |
| 29 atomic_property_set.reset(drmModePropertySetAlloc()); |
| 30 #endif // defined(USE_DRM_ATOMIC) |
| 28 } | 31 } |
| 32 |
| 29 HardwareDisplayPlaneList::~HardwareDisplayPlaneList() { | 33 HardwareDisplayPlaneList::~HardwareDisplayPlaneList() { |
| 30 for (auto* plane : plane_list) { | 34 for (auto* plane : plane_list) { |
| 31 plane->set_in_use(false); | 35 plane->set_in_use(false); |
| 32 plane->set_owning_crtc(0); | 36 plane->set_owning_crtc(0); |
| 33 } | 37 } |
| 34 for (auto* plane : old_plane_list) { | 38 for (auto* plane : old_plane_list) { |
| 35 plane->set_in_use(false); | 39 plane->set_in_use(false); |
| 36 plane->set_owning_crtc(0); | 40 plane->set_owning_crtc(0); |
| 37 } | 41 } |
| 38 } | 42 } |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 if (plane->owning_crtc() == crtc_id) { | 227 if (plane->owning_crtc() == crtc_id) { |
| 224 plane->set_owning_crtc(0); | 228 plane->set_owning_crtc(0); |
| 225 plane->set_in_use(false); | 229 plane->set_in_use(false); |
| 226 } else { | 230 } else { |
| 227 plane_list->old_plane_list.push_back(plane); | 231 plane_list->old_plane_list.push_back(plane); |
| 228 } | 232 } |
| 229 } | 233 } |
| 230 } | 234 } |
| 231 | 235 |
| 232 } // namespace ui | 236 } // namespace ui |
| OLD | NEW |