OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_ATOMIC_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_ATOMIC_H_ |
6 #define UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_ATOMIC_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_ATOMIC_H_ |
7 | 7 |
| 8 #include "ui/gfx/overlay_transform.h" |
8 #include "ui/ozone/platform/drm/gpu/hardware_display_plane.h" | 9 #include "ui/ozone/platform/drm/gpu/hardware_display_plane.h" |
9 | 10 |
10 #include <stdint.h> | 11 #include <stdint.h> |
11 #include <xf86drmMode.h> | 12 #include <xf86drmMode.h> |
12 | 13 |
13 namespace gfx { | 14 namespace gfx { |
14 class Rect; | 15 class Rect; |
15 } // namespace gfx | 16 } // namespace gfx |
16 | 17 |
17 namespace ui { | 18 namespace ui { |
18 | 19 |
19 class CrtcController; | 20 class CrtcController; |
20 class DrmDevice; | 21 class DrmDevice; |
21 | 22 |
22 class HardwareDisplayPlaneAtomic : public HardwareDisplayPlane { | 23 class HardwareDisplayPlaneAtomic : public HardwareDisplayPlane { |
23 public: | 24 public: |
24 HardwareDisplayPlaneAtomic(uint32_t plane_id, uint32_t possible_crtcs); | 25 HardwareDisplayPlaneAtomic(uint32_t plane_id, uint32_t possible_crtcs); |
25 ~HardwareDisplayPlaneAtomic() override; | 26 ~HardwareDisplayPlaneAtomic() override; |
26 | 27 |
27 bool SetPlaneData(drmModeAtomicReq* property_set, | 28 bool SetPlaneData(drmModeAtomicReq* property_set, |
28 uint32_t crtc_id, | 29 uint32_t crtc_id, |
29 uint32_t framebuffer, | 30 uint32_t framebuffer, |
30 const gfx::Rect& crtc_rect, | 31 const gfx::Rect& crtc_rect, |
31 const gfx::Rect& src_rect); | 32 const gfx::Rect& src_rect, |
| 33 const gfx::OverlayTransform transform); |
32 | 34 |
33 void set_crtc(CrtcController* crtc) { crtc_ = crtc; } | 35 void set_crtc(CrtcController* crtc) { crtc_ = crtc; } |
34 CrtcController* crtc() const { return crtc_; } | 36 CrtcController* crtc() const { return crtc_; } |
35 | 37 |
36 private: | 38 private: |
37 bool InitializeProperties( | 39 bool InitializeProperties( |
38 DrmDevice* drm, | 40 DrmDevice* drm, |
39 const ScopedDrmObjectPropertyPtr& plane_props) override; | 41 const ScopedDrmObjectPropertyPtr& plane_props) override; |
40 | 42 |
41 struct Property { | 43 struct Property { |
42 Property(); | 44 Property(); |
43 bool Initialize(DrmDevice* drm, | 45 bool Initialize(DrmDevice* drm, |
44 const char* name, | 46 const char* name, |
45 const ScopedDrmObjectPropertyPtr& plane_properties); | 47 const ScopedDrmObjectPropertyPtr& plane_properties); |
46 uint32_t id = 0; | 48 uint32_t id = 0; |
47 }; | 49 }; |
48 | 50 |
49 Property crtc_prop_; | 51 Property crtc_prop_; |
50 Property fb_prop_; | 52 Property fb_prop_; |
51 Property crtc_x_prop_; | 53 Property crtc_x_prop_; |
52 Property crtc_y_prop_; | 54 Property crtc_y_prop_; |
53 Property crtc_w_prop_; | 55 Property crtc_w_prop_; |
54 Property crtc_h_prop_; | 56 Property crtc_h_prop_; |
55 Property src_x_prop_; | 57 Property src_x_prop_; |
56 Property src_y_prop_; | 58 Property src_y_prop_; |
57 Property src_w_prop_; | 59 Property src_w_prop_; |
58 Property src_h_prop_; | 60 Property src_h_prop_; |
| 61 Property rotation_prop_; |
59 CrtcController* crtc_ = nullptr; | 62 CrtcController* crtc_ = nullptr; |
60 }; | 63 }; |
61 | 64 |
62 } // namespace ui | 65 } // namespace ui |
63 | 66 |
64 #endif // UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_ATOMIC_H_ | 67 #endif // UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_ATOMIC_H_ |
OLD | NEW |