| 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_DRM_GPU_HARDWARE_DISPLAY_PLANE_MANAGER_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_MANAGER_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_MANAGER_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_MANAGER_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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // |crtc_id| will be used. |overlay_list| must be sorted bottom-to-top. | 85 // |crtc_id| will be used. |overlay_list| must be sorted bottom-to-top. |
| 86 virtual bool AssignOverlayPlanes(HardwareDisplayPlaneList* plane_list, | 86 virtual bool AssignOverlayPlanes(HardwareDisplayPlaneList* plane_list, |
| 87 const OverlayPlaneList& overlay_list, | 87 const OverlayPlaneList& overlay_list, |
| 88 uint32_t crtc_id, | 88 uint32_t crtc_id, |
| 89 CrtcController* crtc); | 89 CrtcController* crtc); |
| 90 | 90 |
| 91 // Commit the plane states in |plane_list|. | 91 // Commit the plane states in |plane_list|. |
| 92 virtual bool Commit(HardwareDisplayPlaneList* plane_list, | 92 virtual bool Commit(HardwareDisplayPlaneList* plane_list, |
| 93 bool test_only) = 0; | 93 bool test_only) = 0; |
| 94 | 94 |
| 95 const ScopedVector<HardwareDisplayPlane>& planes() { return planes_; } | 95 const std::vector<scoped_ptr<HardwareDisplayPlane>>& planes() { |
| 96 return planes_; |
| 97 } |
| 96 | 98 |
| 97 std::vector<uint32_t> GetCompatibleHardwarePlaneIds(const OverlayPlane& plane, | 99 std::vector<uint32_t> GetCompatibleHardwarePlaneIds(const OverlayPlane& plane, |
| 98 uint32_t crtc_id) const; | 100 uint32_t crtc_id) const; |
| 99 | 101 |
| 100 protected: | 102 protected: |
| 101 virtual bool SetPlaneData(HardwareDisplayPlaneList* plane_list, | 103 virtual bool SetPlaneData(HardwareDisplayPlaneList* plane_list, |
| 102 HardwareDisplayPlane* hw_plane, | 104 HardwareDisplayPlane* hw_plane, |
| 103 const OverlayPlane& overlay, | 105 const OverlayPlane& overlay, |
| 104 uint32_t crtc_id, | 106 uint32_t crtc_id, |
| 105 const gfx::Rect& src_rect, | 107 const gfx::Rect& src_rect, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 122 bool IsCompatible(HardwareDisplayPlane* plane, | 124 bool IsCompatible(HardwareDisplayPlane* plane, |
| 123 const OverlayPlane& overlay, | 125 const OverlayPlane& overlay, |
| 124 uint32_t crtc_index) const; | 126 uint32_t crtc_index) const; |
| 125 | 127 |
| 126 void ResetCurrentPlaneList(HardwareDisplayPlaneList* plane_list) const; | 128 void ResetCurrentPlaneList(HardwareDisplayPlaneList* plane_list) const; |
| 127 | 129 |
| 128 // Object containing the connection to the graphics device and wraps the API | 130 // Object containing the connection to the graphics device and wraps the API |
| 129 // calls to control it. Not owned. | 131 // calls to control it. Not owned. |
| 130 DrmDevice* drm_; | 132 DrmDevice* drm_; |
| 131 | 133 |
| 132 ScopedVector<HardwareDisplayPlane> planes_; | 134 std::vector<scoped_ptr<HardwareDisplayPlane>> planes_; |
| 133 std::vector<uint32_t> crtcs_; | 135 std::vector<uint32_t> crtcs_; |
| 134 | 136 |
| 135 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayPlaneManager); | 137 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayPlaneManager); |
| 136 }; | 138 }; |
| 137 | 139 |
| 138 } // namespace ui | 140 } // namespace ui |
| 139 | 141 |
| 140 #endif // UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_MANAGER_H_ | 142 #endif // UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_MANAGER_H_ |
| OLD | NEW |