| 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 |
|
| 30 |
void |
| 31 |
XRenderComposite (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 = (CARD8) info->codes->major_opcode; |
| 52 |
req->renderReqType = X_RenderComposite; |
| 53 |
req->op = (CARD8) op; |
| 54 |
req->src = (CARD32) src; |
| 55 |
req->mask = (CARD32) mask; |
| 56 |
req->dst = (CARD32) dst; |
| 57 |
req->xSrc = (INT16) src_x; |
| 58 |
req->ySrc = (INT16) src_y; |
| 59 |
req->xMask = (INT16) mask_x; |
| 60 |
req->yMask = (INT16) mask_y; |
| 61 |
req->xDst = (INT16) dst_x; |
| 62 |
req->yDst = (INT16) dst_y; |
| 63 |
req->width = (CARD16) width; |
| 64 |
req->height = (CARD16) height; |
| 65 |
UnlockDisplay(dpy); |
| 66 |
SyncHandle(); |
| 67 |
} |