ozone: fix HDPMLegacy - do the PF after overlays, also clear old overlays
[chromium-blink-merge.git] / ui / ozone / platform / dri / hardware_display_plane.h
blob7ea4f9501a3054f069250f0da51ee531e46166c7
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_
8 #include <stddef.h>
9 #include <stdint.h>
11 #include "base/basictypes.h"
12 #include "ui/ozone/platform/dri/scoped_drm_types.h"
14 namespace gfx {
15 class Rect;
18 namespace ui {
20 class DriWrapper;
22 class HardwareDisplayPlane {
23 public:
24 HardwareDisplayPlane(ScopedDrmPlanePtr plane);
25 HardwareDisplayPlane(uint32_t plane_id, uint32_t possible_crtcs);
27 virtual ~HardwareDisplayPlane();
29 bool Initialize(DriWrapper* 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 uint32_t plane_id() const { return plane_id_; }
38 void set_owning_crtc(uint32_t crtc) { owning_crtc_ = crtc; }
39 uint32_t owning_crtc() const { return owning_crtc_; }
41 protected:
42 uint32_t plane_id_;
43 uint32_t possible_crtcs_;
44 uint32_t owning_crtc_;
45 bool in_use_;
47 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayPlane);
50 } // namespace ui
52 #endif // UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_PLANE_H_