Xnest: replace XFillRectangles() by xcb_poly_fill_rectangle()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
ef71a7ac7e
commit
63627a9b9b
|
@ -288,8 +288,13 @@ void
|
||||||
xnestPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nRectangles,
|
xnestPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nRectangles,
|
||||||
xRectangle *pRectangles)
|
xRectangle *pRectangles)
|
||||||
{
|
{
|
||||||
XFillRectangles(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC),
|
/* xRectangle and xcb_rectangle_t are defined in the same way, both matching
|
||||||
(XRectangle *) pRectangles, nRectangles);
|
the protocol layout, so we can directly typecast them */
|
||||||
|
xcb_poly_fill_rectangle(xnestUpstreamInfo.conn,
|
||||||
|
xnestDrawable(pDrawable),
|
||||||
|
xnest_upstream_gc(pGC),
|
||||||
|
nRectangles,
|
||||||
|
(xcb_rectangle_t*)pRectangles);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -373,8 +378,16 @@ xnestPushPixels(GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDst,
|
||||||
XSetStipple(xnestDisplay, xnestGC(pGC), xnestPixmap(pBitmap));
|
XSetStipple(xnestDisplay, xnestGC(pGC), xnestPixmap(pBitmap));
|
||||||
XSetTSOrigin(xnestDisplay, xnestGC(pGC), x, y);
|
XSetTSOrigin(xnestDisplay, xnestGC(pGC), x, y);
|
||||||
XSetFillStyle(xnestDisplay, xnestGC(pGC), FillStippled);
|
XSetFillStyle(xnestDisplay, xnestGC(pGC), FillStippled);
|
||||||
XFillRectangle(xnestDisplay, xnestDrawable(pDst),
|
|
||||||
xnestGC(pGC), x, y, width, height);
|
xcb_rectangle_t rect = {
|
||||||
|
.x = x, .y = y, .width = width, .height = height,
|
||||||
|
};
|
||||||
|
xcb_poly_fill_rectangle(xnestUpstreamInfo.conn,
|
||||||
|
xnestDrawable(pDst),
|
||||||
|
xnest_upstream_gc(pGC),
|
||||||
|
1,
|
||||||
|
&rect);
|
||||||
|
|
||||||
XSetFillStyle(xnestDisplay, xnestGC(pGC), FillSolid);
|
XSetFillStyle(xnestDisplay, xnestGC(pGC), FillSolid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue