diff options
author | Keith Packard <keithp@keithp.com> | 2008-03-29 11:45:29 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-03-05 19:11:34 -0800 |
commit | 734c164464a3b5d9d9dd2dc3993de85b1f63c2ff (patch) | |
tree | 7cefcd9b596319686c6309985305de0bef6b120e /do_blt.c | |
parent | ccd5cd064817595cfd0e04a926b73fb17fe31092 (diff) |
Add up/down scaling composite tests
Diffstat (limited to 'do_blt.c')
-rw-r--r-- | do_blt.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -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); |