two-step: Do not rotate bgrt background image for upside-down panels

Upside-down LCD panels are fixed up in HW by the GOP, so the bgrt image is
not rotated in this case and we should not rotate it to compensate.

While at it also fixup the wrong indentation of the
ply_pixel_buffer_set_device_scale() call.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Hans de Goede 2018-12-03 16:20:59 +01:00
parent a7ec3e65ba
commit 10fddacd1e

View file

@ -312,8 +312,12 @@ view_set_bgrt_background (view_t *view)
if (ply_renderer_get_panel_properties (ply_pixel_display_get_renderer (view->display),
&panel_width, &panel_height,
&panel_rotation, &panel_scale)) {
ply_pixel_buffer_set_device_rotation (bgrt_buffer, panel_rotation);
ply_pixel_buffer_set_device_scale (bgrt_buffer, panel_scale);
/* Upside-down panels are fixed up in HW by the GOP, so the
* bgrt image is not rotated in this case.
*/
if (panel_rotation != PLY_PIXEL_BUFFER_ROTATE_UPSIDE_DOWN)
ply_pixel_buffer_set_device_rotation (bgrt_buffer, panel_rotation);
ply_pixel_buffer_set_device_scale (bgrt_buffer, panel_scale);
}
width = ply_pixel_buffer_get_width (bgrt_buffer);