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/dri/hardware_display_plane.h" | 5 #include "ui/ozone/platform/dri/hardware_display_plane.h" |
6 | 6 |
7 #include <drm.h> | 7 #include <drm.h> |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <xf86drm.h> | 9 #include <xf86drm.h> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
13 #include "ui/ozone/platform/dri/dri_wrapper.h" | 13 #include "ui/ozone/platform/dri/drm_device.h" |
14 | 14 |
15 namespace ui { | 15 namespace ui { |
16 | 16 |
17 HardwareDisplayPlane::HardwareDisplayPlane(ScopedDrmPlanePtr plane) | 17 HardwareDisplayPlane::HardwareDisplayPlane(ScopedDrmPlanePtr plane) |
18 : plane_id_(plane->plane_id), | 18 : plane_id_(plane->plane_id), |
19 possible_crtcs_(plane->possible_crtcs), | 19 possible_crtcs_(plane->possible_crtcs), |
20 owning_crtc_(0), | 20 owning_crtc_(0), |
21 in_use_(false) { | 21 in_use_(false) { |
22 } | 22 } |
23 | 23 |
24 HardwareDisplayPlane::HardwareDisplayPlane(uint32_t plane_id, | 24 HardwareDisplayPlane::HardwareDisplayPlane(uint32_t plane_id, |
25 uint32_t possible_crtcs) | 25 uint32_t possible_crtcs) |
26 : plane_id_(plane_id), possible_crtcs_(possible_crtcs), in_use_(false) { | 26 : plane_id_(plane_id), possible_crtcs_(possible_crtcs), in_use_(false) { |
27 } | 27 } |
28 | 28 |
29 HardwareDisplayPlane::~HardwareDisplayPlane() { | 29 HardwareDisplayPlane::~HardwareDisplayPlane() { |
30 } | 30 } |
31 | 31 |
32 bool HardwareDisplayPlane::CanUseForCrtc(uint32_t crtc_index) { | 32 bool HardwareDisplayPlane::CanUseForCrtc(uint32_t crtc_index) { |
33 return possible_crtcs_ & (1 << crtc_index); | 33 return possible_crtcs_ & (1 << crtc_index); |
34 } | 34 } |
35 | 35 |
36 bool HardwareDisplayPlane::Initialize(DriWrapper* drm) { | 36 bool HardwareDisplayPlane::Initialize(DrmDevice* drm) { |
37 return true; | 37 return true; |
38 } | 38 } |
39 | 39 |
40 } // namespace ui | 40 } // namespace ui |
OLD | NEW |