Chromium Code Reviews| Index: ui/ozone/platform/drm/gpu/hardware_display_controller.cc |
| diff --git a/ui/ozone/platform/drm/gpu/hardware_display_controller.cc b/ui/ozone/platform/drm/gpu/hardware_display_controller.cc |
| index 1b503c558f8bb440ca8b894bc44d00b643f778c0..46cb247a7414e2639b2c027e258e3460731dc908 100644 |
| --- a/ui/ozone/platform/drm/gpu/hardware_display_controller.cc |
| +++ b/ui/ozone/platform/drm/gpu/hardware_display_controller.cc |
| @@ -156,6 +156,21 @@ std::vector<uint32_t> HardwareDisplayController::GetCompatibleHardwarePlaneIds( |
| return plane_ids; |
| } |
| +bool HardwareDisplayController::IsFormatSupported(uint32_t fourcc_format, |
| + uint32_t z_order) const { |
| + if (!crtc_controllers_[0]->IsFormatSupported(fourcc_format, z_order)) |
|
dnicoara
2015/11/09 20:53:23
This can be handled in the for-loop.
|
| + return false; |
| + |
| + for (size_t i = 1; i < crtc_controllers_.size(); ++i) { |
| + // Make sure all mirrored displays have overlays to support this |
| + // plane. |
| + if (!crtc_controllers_[i]->IsFormatSupported(fourcc_format, z_order)) |
| + return false; |
| + } |
| + |
| + return true; |
| +} |
| + |
| bool HardwareDisplayController::SetCursor( |
| const scoped_refptr<ScanoutBuffer>& buffer) { |
| bool status = true; |