示例#1
0
static __DRIdrawable *
dri2CreateNewDrawable(__DRIscreen *screen, const __DRIconfig *config,
		      unsigned int drawable_id, unsigned int head, void *data)
{
    __DRIdrawable *pdraw;

    pdraw = driCreateNewDrawable(screen, config, 0, 0, NULL, data);
    if (!pdraw)
    	return NULL;

    pdraw->dri2.drawable_id = drawable_id;
    pdraw->dri2.tail = head;
    pdraw->pBackClipRects = _mesa_malloc(sizeof *pdraw->pBackClipRects);

    return pdraw;
}
示例#2
0
static __DRIdrawable *
dri2CreateNewDrawable(__DRIscreen *screen,
                      const __DRIconfig *config,
                      void *loaderPrivate)
{
    __DRIdrawable *pdraw;

    pdraw = driCreateNewDrawable(screen, config, 0, 0, NULL, loaderPrivate);
    if (!pdraw)
        return NULL;

    pdraw->pClipRects = &pdraw->dri2.clipRect;
    pdraw->pBackClipRects = &pdraw->dri2.clipRect;

    pdraw->pStamp = &pdraw->dri2.stamp;
    *pdraw->pStamp = pdraw->lastStamp + 1;

    return pdraw;
}