mirror of
https://github.com/X11Libre/xserver.git
synced 2026-01-26 14:03:17 +00:00
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:
parent
55140c469d
commit
d244e8a097
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user