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_DRM_GPU_HARDWARE_DISPLAY_PLANE_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_H_
11 #include "base/basictypes.h"
12 #include "ui/ozone/ozone_export.h"
13 #include "ui/ozone/platform/drm/gpu/scoped_drm_types.h"
23 class OZONE_EXPORT HardwareDisplayPlane
{
25 HardwareDisplayPlane(uint32_t plane_id
, uint32_t possible_crtcs
);
27 virtual ~HardwareDisplayPlane();
29 virtual bool Initialize(DrmDevice
* drm
);
31 bool CanUseForCrtc(uint32_t crtc_index
);
33 bool in_use() const { return in_use_
; }
34 void set_in_use(bool in_use
) { in_use_
= in_use
; }
36 bool is_dummy() const { return is_dummy_
; }
37 void set_is_dummy(bool is_dummy
) { is_dummy_
= is_dummy
; }
39 uint32_t plane_id() const { return plane_id_
; }
41 void set_owning_crtc(uint32_t crtc
) { owning_crtc_
= crtc
; }
42 uint32_t owning_crtc() const { return owning_crtc_
; }
46 uint32_t possible_crtcs_
;
47 uint32_t owning_crtc_
;
51 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayPlane
);
56 #endif // UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_H_