kms/update: Make dst_rect a int rectangle

It's never used as a 16.16 fixed point rectangle so no reason it should
be passed around as one.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1488>
This commit is contained in:
Jonas Ådahl 2020-09-21 18:00:36 +02:00 committed by Marge Bot
parent 7f60d8bd66
commit 17712f7905
6 changed files with 19 additions and 19 deletions

View File

@ -105,7 +105,7 @@ meta_crtc_kms_assign_primary_plane (MetaCrtcKms *crtc_kms,
const MetaCrtcConfig *crtc_config;
const MetaCrtcModeInfo *crtc_mode_info;
MetaFixed16Rectangle src_rect;
MetaFixed16Rectangle dst_rect;
MetaRectangle dst_rect;
MetaKmsAssignPlaneFlag flags;
MetaKmsCrtc *kms_crtc;
MetaKmsDevice *kms_device;
@ -121,11 +121,11 @@ meta_crtc_kms_assign_primary_plane (MetaCrtcKms *crtc_kms,
.width = meta_fixed_16_from_int (crtc_mode_info->width),
.height = meta_fixed_16_from_int (crtc_mode_info->height),
};
dst_rect = (MetaFixed16Rectangle) {
.x = meta_fixed_16_from_int (0),
.y = meta_fixed_16_from_int (0),
.width = meta_fixed_16_from_int (crtc_mode_info->width),
.height = meta_fixed_16_from_int (crtc_mode_info->height),
dst_rect = (MetaRectangle) {
.x = 0,
.y = 0,
.width = crtc_mode_info->width,
.height = crtc_mode_info->height,
};
flags = META_KMS_ASSIGN_PLANE_FLAG_NONE;

View File

@ -272,7 +272,7 @@ set_crtc_cursor (MetaCursorRendererNative *native,
union gbm_bo_handle handle;
int cursor_width, cursor_height;
MetaFixed16Rectangle src_rect;
MetaFixed16Rectangle dst_rect;
MetaRectangle dst_rect;
struct gbm_bo *crtc_bo;
MetaKmsAssignPlaneFlag flags;
int cursor_hotspot_x;
@ -299,11 +299,11 @@ set_crtc_cursor (MetaCursorRendererNative *native,
.width = meta_fixed_16_from_int (cursor_width),
.height = meta_fixed_16_from_int (cursor_height),
};
dst_rect = (MetaFixed16Rectangle) {
.x = meta_fixed_16_from_int (x),
.y = meta_fixed_16_from_int (y),
.width = meta_fixed_16_from_int (cursor_width),
.height = meta_fixed_16_from_int (cursor_height),
dst_rect = (MetaRectangle) {
.x = x,
.y = y,
.width = cursor_width,
.height = cursor_height,
};
flags = META_KMS_ASSIGN_PLANE_FLAG_NONE;

View File

@ -852,8 +852,8 @@ process_cursor_plane_assignment (MetaKmsImplDevice *impl_device,
int width, height;
int ret = -1;
width = meta_fixed_16_to_int (plane_assignment->dst_rect.width);
height = meta_fixed_16_to_int (plane_assignment->dst_rect.height);
width = plane_assignment->dst_rect.width;
height = plane_assignment->dst_rect.height;
if (plane_assignment->cursor_hotspot.is_valid)
{
@ -882,8 +882,8 @@ process_cursor_plane_assignment (MetaKmsImplDevice *impl_device,
drmModeMoveCursor (fd,
crtc_id,
meta_fixed_16_to_int (plane_assignment->dst_rect.x),
meta_fixed_16_to_int (plane_assignment->dst_rect.y));
plane_assignment->dst_rect.x,
plane_assignment->dst_rect.y);
return TRUE;
}

View File

@ -41,7 +41,7 @@ typedef struct _MetaKmsPlaneAssignment
MetaKmsPlane *plane;
uint32_t fb_id;
MetaFixed16Rectangle src_rect;
MetaFixed16Rectangle dst_rect;
MetaRectangle dst_rect;
MetaKmsAssignPlaneFlag flags;
uint64_t rotation;

View File

@ -141,7 +141,7 @@ meta_kms_update_assign_plane (MetaKmsUpdate *update,
MetaKmsPlane *plane,
uint32_t fb_id,
MetaFixed16Rectangle src_rect,
MetaFixed16Rectangle dst_rect,
MetaRectangle dst_rect,
MetaKmsAssignPlaneFlag flags)
{
MetaKmsPlaneAssignment *plane_assignment;

View File

@ -114,7 +114,7 @@ MetaKmsPlaneAssignment * meta_kms_update_assign_plane (MetaKmsUpdate *u
MetaKmsPlane *plane,
uint32_t fb_id,
MetaFixed16Rectangle src_rect,
MetaFixed16Rectangle dst_rect,
MetaRectangle dst_rect,
MetaKmsAssignPlaneFlag flags);
MetaKmsPlaneAssignment * meta_kms_update_unassign_plane (MetaKmsUpdate *update,