diff options
author | Keith Packard <keithp@keithp.com> | 2014-04-01 14:48:42 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-04-13 15:26:31 -0700 |
commit | ba26e97853d209663de8527cfefee16afe3b959b (patch) | |
tree | d05c7bec6e37765ce4af0874c860ef6abe710a84 | |
parent | 0fcb26e0efdab2a8662b50dd6957b681c87b6737 (diff) |
Make put image tests work with planemasks
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/1>
-rw-r--r-- | do_blt.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -208,13 +208,13 @@ InitCopyPix(XParms xp, Parms p, int64_t reps) return reps; } -int -InitGetImage(XParms xp, Parms p, int64_t reps) +static int +InitImage(XParms xp, Parms p, int64_t reps, long pm) { (void) InitCopyWin(xp, p, reps); /* Create image to stuff bits into */ - image = XGetImage(xp->d, xp->w, 0, 0, WIDTH, HEIGHT, xp->planemask, + image = XGetImage(xp->d, xp->w, 0, 0, WIDTH, HEIGHT, pm, p->font==NULL?ZPixmap:XYPixmap); if(image==NULL){ printf("XGetImage failed\n"); @@ -224,9 +224,15 @@ InitGetImage(XParms xp, Parms p, int64_t reps) } int +InitGetImage(XParms xp, Parms p, int64_t reps) +{ + return InitImage(xp, p, reps, xp->planemask); +} + +int InitPutImage(XParms xp, Parms p, int64_t reps) { - if(!InitGetImage(xp, p, reps))return False; + if(!InitImage(xp, p, reps, 0xffffffff))return False; XClearWindow(xp->d, xp->w); return reps; } @@ -372,7 +378,7 @@ InitShmImage(XParms xp, Parms p, int64_t reps, Bool read_only) { int image_size; - if(!InitGetImage(xp, p, reps))return False; + if(!InitImage(xp, p, reps, 0xffffffff))return False; if (!XShmQueryExtension(xp->d)) { /* * Clean up here because cleanup function is not called if this |