From 734c164464a3b5d9d9dd2dc3993de85b1f63c2ff Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 29 Mar 2008 11:45:29 -0700 Subject: Add up/down scaling composite tests --- do_blt.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'do_blt.c') diff --git a/do_blt.c b/do_blt.c index f843ae5..1f4985a 100644 --- a/do_blt.c +++ b/do_blt.c @@ -614,8 +614,14 @@ int InitCompositeWin(XParms xp, Parms p, int reps) { XRenderPictFormat *format; + int mul = 1, div = 1; + + if (p->fillStyle) { + mul = 0x10000; + div = p->fillStyle; + } (void) InitScroll (xp, p, reps); - InitCopyLocations (xp, p, reps); + InitCopyLocations (xp, p, reps, mul, div); format = XRenderFindVisualFormat (xp->d, xp->vinfo.visual); winPict = XRenderCreatePicture (xp->d, xp->w, format, 0, NULL); return reps; @@ -660,6 +666,14 @@ InitCompositePix(XParms xp, Parms p, int reps) pix = XCreatePixmap(xp->d, xp->w, WIDTH, HEIGHT, depth); pixPict = XRenderCreatePicture (xp->d, pix, format, 0, NULL); + if (p->fillStyle) { + XTransform transform; + memset (&transform, '\0', sizeof (transform)); + transform.matrix[0][0] = 0x10000; + transform.matrix[1][1] = 0x10000; + transform.matrix[2][2] = p->fillStyle; + XRenderSetPictureTransform (xp->d, pixPict, &transform); + } XRenderComposite (xp->d, PictOpClear, winPict, None, pixPict, 0, 0, 0, 0, 0, 0, WIDTH, HEIGHT); -- cgit v1.2.3