… | |
… | |
434 | Display *dpy = s->display->dpy; |
434 | Display *dpy = s->display->dpy; |
435 | Picture src = XRenderCreatePicture (dpy, pm, format, 0, 0); |
435 | Picture src = XRenderCreatePicture (dpy, pm, format, 0, 0); |
436 | Picture dst = XRenderCreatePicture (dpy, img->pm, new_format, 0, 0); |
436 | Picture dst = XRenderCreatePicture (dpy, img->pm, new_format, 0, 0); |
437 | int op = PictOpSrc; |
437 | int op = PictOpSrc; |
438 | |
438 | |
439 | printf ("fa %x,%x fb %x,%x\n", f->direct.alpha, f->direct.alpha_mask, new_format->direct.alpha, new_format->direct.alpha_mask);//D |
439 | printf ("fa %x,%x fb %x,%x\n", format->direct.alpha, format->direct.alphaMask, new_format->direct.alpha, new_format->direct.alphaMask);//D |
440 | |
440 | |
441 | if (f->direct.alpha && !new_format->direct.alpha) |
441 | if (format->direct.alpha && !new_format->direct.alpha) |
442 | { |
442 | { |
443 | // does it have to be that complicated |
443 | // does it have to be that complicated |
444 | rgba c; |
444 | rgba c; |
445 | bg.get (c); |
445 | bg.get (c); |
446 | |
446 | |
447 | XRenderColor rc = { c.r, c.g, c.b, 0xffff }; |
447 | XRenderColor rc = { c.r, c.g, c.b, 0xffff }; |
448 | |
|
|
449 | XRenderFillRectangle (dpy, PictOpSrc, dst, &mask_c, 0, 0, w, h); |
448 | XRenderFillRectangle (dpy, PictOpSrc, dst, &rc, 0, 0, w, h); |
450 | |
449 | |
451 | op = PictOpOver; |
450 | op = PictOpOver; |
452 | } |
451 | } |
453 | |
452 | |
454 | XRenderComposite (dpy, op, src, None, dst, 0, 0, 0, 0, 0, 0, w, h); |
453 | XRenderComposite (dpy, op, src, None, dst, 0, 0, 0, 0, 0, 0, w, h); |