mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
1
This commit is contained in:
@@ -11,17 +11,35 @@
|
||||
|
||||
#include "xnest-xcb.h"
|
||||
|
||||
struct xnest_picture_priv {
|
||||
struct xnest_picture_privrec {
|
||||
xcb_render_picture_t upstream_xid;
|
||||
};
|
||||
|
||||
DevPrivateKeyRec xnestPicturePrivateKey;
|
||||
|
||||
static inline struct xnest_render_picture_privrec *
|
||||
xnest_render_picture_get_priv(PicturePtr pPict)
|
||||
{
|
||||
void *p = dixLookupPrivate(&pPict->devPrivates, &xnestPicturePrivateKey);
|
||||
if (p)
|
||||
fprintf(stderr, "PRIV OK\n");
|
||||
else
|
||||
fprintf(stderr, "PRIV MISSING\n");
|
||||
return p;
|
||||
}
|
||||
|
||||
static void xnest_render_composite(
|
||||
uint8_t op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
|
||||
int16_t xSrc, int16_t ySrc, int16_t xMask, int16_t yMask,
|
||||
int16_t xDst, int16_t yDst, uint16_t width, uint16_t height)
|
||||
{
|
||||
struct xnest_render_picture_privrec *pSrcPriv =
|
||||
xnest_render_picture_get_priv(pSrc);
|
||||
struct xnest_render_picture_privrec *pMaskPriv =
|
||||
xnest_render_picture_get_priv(pMask);
|
||||
struct xnest_render_picture_privrec *pDstkPriv =
|
||||
xnest_render_picture_get_priv(pDst);
|
||||
|
||||
fprintf(stderr, "xnest_render_composite\n");
|
||||
}
|
||||
|
||||
@@ -29,12 +47,18 @@ static void xnest_render_add_traps(
|
||||
PicturePtr pPicture, int16_t xOff, int16_t yOff, int ntrap,
|
||||
xTrap *traps)
|
||||
{
|
||||
struct xnest_render_picture_privrec *pPicture =
|
||||
xnest_render_picture_get_priv(pPicture);
|
||||
|
||||
fprintf(stderr, "xnest_render_add_traps\n");
|
||||
}
|
||||
|
||||
static void xnest_render_rasterize_trapezoid(
|
||||
PicturePtr alpha, xTrapezoid *trap, int x_off, int y_off)
|
||||
{
|
||||
struct xnest_render_picture_privrec *pPicture =
|
||||
xnest_render_picture_get_priv(pPicture);
|
||||
|
||||
fprintf(stderr, "xnest_render_rasterize_trapezoid\n");
|
||||
}
|
||||
|
||||
@@ -82,7 +106,7 @@ Bool xnest_picture_init(ScreenPtr pScreen)
|
||||
if (!miPictureInit(pScreen, 0, 0))
|
||||
return FALSE;
|
||||
|
||||
if (!dixRegisterPrivateKey(&xnestPicturePrivateKey, PRIVATE_PICTURE, sizeof(struct xnest_picture_priv))) {
|
||||
if (!dixRegisterPrivateKey(&xnestPicturePrivateKey, PRIVATE_PICTURE, sizeof(struct xnest_picture_privrec))) {
|
||||
fprintf(stderr, "failed to allocate PRIVATE_PICTURE\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user