include: pixmapstr.h: inline PixmapBox() and fix signedness

Not used anywhere else than just once in this header, so we can directly
inline it. Also adding explicit typecast to silence signedness warning.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-09-15 18:52:14 +02:00 committed by Enrico Weigelt
parent 55140c469d
commit d244e8a097

View File

@ -97,23 +97,13 @@ typedef struct _PixmapDirtyUpdate {
struct pixman_f_transform f_transform, f_inverse;
} PixmapDirtyUpdateRec;
static inline void
PixmapBox(BoxPtr box, PixmapPtr pixmap)
{
box->x1 = 0;
box->x2 = pixmap->drawable.width;
box->y1 = 0;
box->y2 = pixmap->drawable.height;
}
static inline void
PixmapRegionInit(RegionPtr region, PixmapPtr pixmap)
{
BoxRec box;
PixmapBox(&box, pixmap);
BoxRec box = {
.x2 = (int16_t)pixmap->drawable.width,
.y2 = (int16_t)pixmap->drawable.height,
};
RegionInit(region, &box, 1);
}