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
3 // found in the LICENSE file.
5 #ifndef UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_PLANE_H_
6 #define UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_PLANE_H_
10 #include <xf86drmMode.h>
12 #include "base/basictypes.h"
13 #include "ui/ozone/platform/dri/scoped_drm_types.h"
23 class HardwareDisplayPlane
{
25 HardwareDisplayPlane(DriWrapper
* drm
,
26 drmModePropertySetPtr atomic_property_set
,
27 ScopedDrmPlanePtr plane
);
29 ~HardwareDisplayPlane();
33 bool CanUseForCrtc(uint32_t crtc_id
);
34 bool SetPlaneData(uint32_t crtc_id
,
36 const gfx::Rect
& crtc_rect
,
37 const gfx::Rect
& src_rect
);
39 bool in_use() const { return in_use_
; }
40 void set_in_use(bool in_use
) { in_use_
= in_use
; }
45 bool Initialize(DriWrapper
* drm
,
47 const ScopedDrmObjectPropertyPtr
& plane_properties
);
50 // Object containing the connection to the graphics device and wraps the API
51 // calls to control it.
55 drmModePropertySetPtr property_set_
;
57 ScopedDrmPlanePtr plane_
;
63 Property crtc_x_prop_
;
64 Property crtc_y_prop_
;
65 Property crtc_w_prop_
;
66 Property crtc_h_prop_
;
72 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayPlane
);
77 #endif // UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_PLANE_H_