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 #include "ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.h" | 5 #include "ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "ui/ozone/platform/drm/gpu/crtc_controller.h" | 10 #include "ui/ozone/platform/drm/gpu/crtc_controller.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 return ret; | 98 return ret; |
99 } | 99 } |
100 | 100 |
101 bool HardwareDisplayPlaneManagerLegacy::SetPlaneData( | 101 bool HardwareDisplayPlaneManagerLegacy::SetPlaneData( |
102 HardwareDisplayPlaneList* plane_list, | 102 HardwareDisplayPlaneList* plane_list, |
103 HardwareDisplayPlane* hw_plane, | 103 HardwareDisplayPlane* hw_plane, |
104 const OverlayPlane& overlay, | 104 const OverlayPlane& overlay, |
105 uint32_t crtc_id, | 105 uint32_t crtc_id, |
106 const gfx::Rect& src_rect, | 106 const gfx::Rect& src_rect, |
107 CrtcController* crtc) { | 107 CrtcController* crtc) { |
| 108 // Legacy modesetting rejects transforms. |
| 109 if (overlay.plane_transform != gfx::OVERLAY_TRANSFORM_NONE) |
| 110 return false; |
108 if ((hw_plane->type() == HardwareDisplayPlane::kDummy) || | 111 if ((hw_plane->type() == HardwareDisplayPlane::kDummy) || |
109 plane_list->legacy_page_flips.empty() || | 112 plane_list->legacy_page_flips.empty() || |
110 plane_list->legacy_page_flips.back().crtc_id != crtc_id) { | 113 plane_list->legacy_page_flips.back().crtc_id != crtc_id) { |
111 plane_list->legacy_page_flips.push_back( | 114 plane_list->legacy_page_flips.push_back( |
112 HardwareDisplayPlaneList::PageFlipInfo( | 115 HardwareDisplayPlaneList::PageFlipInfo( |
113 crtc_id, overlay.buffer->GetOpaqueFramebufferId(), crtc)); | 116 crtc_id, overlay.buffer->GetOpaqueFramebufferId(), crtc)); |
114 } else { | 117 } else { |
115 plane_list->legacy_page_flips.back().planes.push_back( | 118 plane_list->legacy_page_flips.back().planes.push_back( |
116 HardwareDisplayPlaneList::PageFlipInfo::Plane( | 119 HardwareDisplayPlaneList::PageFlipInfo::Plane( |
117 hw_plane->plane_id(), overlay.buffer->GetFramebufferId(), | 120 hw_plane->plane_id(), overlay.buffer->GetFramebufferId(), |
118 overlay.display_bounds, src_rect)); | 121 overlay.display_bounds, src_rect)); |
119 } | 122 } |
120 return true; | 123 return true; |
121 } | 124 } |
122 | 125 |
123 } // namespace ui | 126 } // namespace ui |
OLD | NEW |