Commit 476e4996 authored by Andres Calderon Jaramillo's avatar Andres Calderon Jaramillo Committed by Commit Bot

ozone: Don't scanout buffers with horizontal flip.

This CL ensures that buffers that require a horizontal flip transform
are not promoted to overlays. The reason why this is needed is that
support for this transform is dependent on the buffer layout (e.g., on
some devices, linear buffers with a horizontal flip transform cannot be
scanned out). Unfortunately, page flip testing does not currently use
real buffers, so we could end up promoting a buffer to an overlay plane
incorrectly.

Horizontally flipped linear buffers are used in the camera capture app.
They can also be used by web pages that use getUserMedia() plus CSS.

Bug: b:161758029, b:168899960
Test: launch the camera capture app on JSL
Change-Id: I24df6c8e0820ce391e5699de3cb906f348df9ec2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2434911
Commit-Queue: Andres Calderon Jaramillo <andrescj@chromium.org>
Reviewed-by: default avatarDaniele Castagna <dcastagna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811375}
parent 1df2fd67
......@@ -93,7 +93,6 @@ bool CrtcController::AssignOverlayPlanes(HardwareDisplayPlaneList* plane_list,
if (!drm_->plane_manager()->AssignOverlayPlanes(plane_list, overlays,
crtc_)) {
PLOG(ERROR) << "Failed to assign overlay planes for crtc " << crtc_;
return false;
}
......
......@@ -38,7 +38,8 @@ uint32_t OverlayTransformToDrmRotationPropertyValue(
// TODO(https://crbug/880464): Remove this.
bool IsRotationTransformSupported(gfx::OverlayTransform transform) {
if ((transform == gfx::OVERLAY_TRANSFORM_ROTATE_90) ||
(transform == gfx::OVERLAY_TRANSFORM_ROTATE_270)) {
(transform == gfx::OVERLAY_TRANSFORM_ROTATE_270) ||
(transform == gfx::OVERLAY_TRANSFORM_FLIP_HORIZONTAL)) {
return false;
}
......
......@@ -306,7 +306,6 @@ bool HardwareDisplayPlaneManagerAtomic::SetPlaneData(
crtc_id, framebuffer_id,
overlay.display_bounds, src_rect,
overlay.plane_transform, fence_fd)) {
LOG(ERROR) << "Failed to set plane properties";
return false;
}
return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment