| 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 #ifndef UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_PLANE_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_PLANE_H_ |
| 6 #define UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_PLANE_H_ | 6 #define UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_PLANE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <xf86drmMode.h> | 10 #include <xf86drmMode.h> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 class HardwareDisplayPlane { | 23 class HardwareDisplayPlane { |
| 24 public: | 24 public: |
| 25 HardwareDisplayPlane(DriWrapper* drm, | 25 HardwareDisplayPlane(DriWrapper* drm, |
| 26 drmModePropertySetPtr atomic_property_set, | 26 drmModePropertySetPtr atomic_property_set, |
| 27 ScopedDrmPlanePtr plane); | 27 ScopedDrmPlanePtr plane); |
| 28 | 28 |
| 29 ~HardwareDisplayPlane(); | 29 ~HardwareDisplayPlane(); |
| 30 | 30 |
| 31 bool Initialize(); | 31 bool Initialize(); |
| 32 | 32 |
| 33 bool CanUseForCrtc(uint32_t crtc_id); |
| 33 bool SetPlaneData(uint32_t crtc_id, | 34 bool SetPlaneData(uint32_t crtc_id, |
| 34 uint32_t framebuffer, | 35 uint32_t framebuffer, |
| 35 const gfx::Rect& crtc_rect, | 36 const gfx::Rect& crtc_rect, |
| 36 const gfx::Rect& src_rect); | 37 const gfx::Rect& src_rect); |
| 37 | 38 |
| 39 bool in_use() const { return in_use_; } |
| 40 void set_in_use(bool in_use) { in_use_ = in_use; } |
| 41 |
| 38 private: | 42 private: |
| 39 struct Property { | 43 struct Property { |
| 40 Property(); | 44 Property(); |
| 41 bool Initialize(DriWrapper* drm, | 45 bool Initialize(DriWrapper* drm, |
| 42 const char* name, | 46 const char* name, |
| 43 const ScopedDrmObjectPropertyPtr& plane_properties); | 47 const ScopedDrmObjectPropertyPtr& plane_properties); |
| 44 uint32_t id_; | 48 uint32_t id_; |
| 45 }; | 49 }; |
| 46 // Object containing the connection to the graphics device and wraps the API | 50 // Object containing the connection to the graphics device and wraps the API |
| 47 // calls to control it. | 51 // calls to control it. |
| 48 DriWrapper* drm_; | 52 DriWrapper* drm_; |
| 49 | 53 |
| 50 // Not owned. | 54 // Not owned. |
| 51 drmModePropertySetPtr property_set_; | 55 drmModePropertySetPtr property_set_; |
| 52 | 56 |
| 53 ScopedDrmPlanePtr plane_; | 57 ScopedDrmPlanePtr plane_; |
| 54 uint32_t plane_id_; | 58 uint32_t plane_id_; |
| 59 bool in_use_; |
| 55 | 60 |
| 56 Property crtc_prop_; | 61 Property crtc_prop_; |
| 57 Property fb_prop_; | 62 Property fb_prop_; |
| 58 Property crtc_x_prop_; | 63 Property crtc_x_prop_; |
| 59 Property crtc_y_prop_; | 64 Property crtc_y_prop_; |
| 60 Property crtc_w_prop_; | 65 Property crtc_w_prop_; |
| 61 Property crtc_h_prop_; | 66 Property crtc_h_prop_; |
| 62 Property src_x_prop_; | 67 Property src_x_prop_; |
| 63 Property src_y_prop_; | 68 Property src_y_prop_; |
| 64 Property src_w_prop_; | 69 Property src_w_prop_; |
| 65 Property src_h_prop_; | 70 Property src_h_prop_; |
| 66 | 71 |
| 67 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayPlane); | 72 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayPlane); |
| 68 }; | 73 }; |
| 69 | 74 |
| 70 } // namespace ui | 75 } // namespace ui |
| 71 | 76 |
| 72 #endif // UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_PLANE_H_ | 77 #endif // UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_PLANE_H_ |
| OLD | NEW |