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 MetaCrtcConfig *crtc_config;
const MetaCrtcModeInfo *crtc_mode_info; const MetaCrtcModeInfo *crtc_mode_info;
MetaFixed16Rectangle src_rect; MetaFixed16Rectangle src_rect;
MetaFixed16Rectangle dst_rect; MetaRectangle dst_rect;
MetaKmsAssignPlaneFlag flags; MetaKmsAssignPlaneFlag flags;
MetaKmsCrtc *kms_crtc; MetaKmsCrtc *kms_crtc;
MetaKmsDevice *kms_device; 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), .width = meta_fixed_16_from_int (crtc_mode_info->width),
.height = meta_fixed_16_from_int (crtc_mode_info->height), .height = meta_fixed_16_from_int (crtc_mode_info->height),
}; };
dst_rect = (MetaFixed16Rectangle) { dst_rect = (MetaRectangle) {
.x = meta_fixed_16_from_int (0), .x = 0,
.y = meta_fixed_16_from_int (0), .y = 0,
.width = meta_fixed_16_from_int (crtc_mode_info->width), .width = crtc_mode_info->width,
.height = meta_fixed_16_from_int (crtc_mode_info->height), .height = crtc_mode_info->height,
}; };
flags = META_KMS_ASSIGN_PLANE_FLAG_NONE; flags = META_KMS_ASSIGN_PLANE_FLAG_NONE;

View File

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

View File

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

View File

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

View File

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

View File

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