Composite.c revision 6fae4e5d
1/*
2 *
3 * Copyright © 2000 SuSE, Inc.
4 *
5 * Permission to use, copy, modify, distribute, and sell this software and its
6 * documentation for any purpose is hereby granted without fee, provided that
7 * the above copyright notice appear in all copies and that both that
8 * copyright notice and this permission notice appear in supporting
9 * documentation, and that the name of SuSE not be used in advertising or
10 * publicity pertaining to distribution of the software without specific,
11 * written prior permission.  SuSE makes no representations about the
12 * suitability of this software for any purpose.  It is provided "as is"
13 * without express or implied warranty.
14 *
15 * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
17 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
19 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
20 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 *
22 * Author:  Keith Packard, SuSE, Inc.
23 */
24
25#ifdef HAVE_CONFIG_H
26#include <config.h>
27#endif
28#include "Xrenderint.h"
29
30void
31XRenderComposite (Display   *dpy,
32		  int	    op,
33		  Picture   src,
34		  Picture   mask,
35		  Picture   dst,
36		  int	    src_x,
37		  int	    src_y,
38		  int	    mask_x,
39		  int	    mask_y,
40		  int	    dst_x,
41		  int	    dst_y,
42		  unsigned int	width,
43		  unsigned int	height)
44{
45    XRenderExtDisplayInfo         *info = XRenderFindDisplay (dpy);
46    xRenderCompositeReq	    *req;
47
48    RenderSimpleCheckExtension (dpy, info);
49    LockDisplay(dpy);
50    GetReq(RenderComposite, req);
51    req->reqType = info->codes->major_opcode;
52    req->renderReqType = X_RenderComposite;
53    req->op = (CARD8) op;
54    req->src = src;
55    req->mask = mask;
56    req->dst = dst;
57    req->xSrc = src_x;
58    req->ySrc = src_y;
59    req->xMask = mask_x;
60    req->yMask = mask_y;
61    req->xDst = dst_x;
62    req->yDst = dst_y;
63    req->width = width;
64    req->height = height;
65    UnlockDisplay(dpy);
66    SyncHandle();
67}
68