--- rxvt-unicode/src/rxvtimg.C 2012/06/09 11:41:28 1.70 +++ rxvt-unicode/src/rxvtimg.C 2012/06/09 17:28:03 1.73 @@ -51,6 +51,7 @@ return img; } +# if HAVE_PIXBUF rxvt_img * rxvt_img::new_from_pixbuf (rxvt_screen *s, GdkPixbuf *pb) { @@ -168,6 +169,7 @@ return img; } +# endif void rxvt_img::destroy () @@ -316,21 +318,6 @@ return img; } -static Picture -create_xrender_mask (Display *dpy, Drawable drawable, Bool argb) -{ - Pixmap pixmap = XCreatePixmap (dpy, drawable, 1, 1, argb ? 32 : 8); - - XRenderPictFormat *format = XRenderFindStandardFormat (dpy, argb ? PictStandardARGB32 : PictStandardA8); - XRenderPictureAttributes pa; - pa.repeat = True; - Picture mask = XRenderCreatePicture (dpy, pixmap, format, CPRepeat, &pa); - - XFreePixmap (dpy, pixmap); - - return mask; -} - static void extract (int32_t cl0, int32_t cl1, int32_t &c, unsigned short &xc) { @@ -396,7 +383,6 @@ unshare (); Display *dpy = s->display->dpy; - Picture src = create_xrender_mask (dpy, pm, True); Picture dst = XRenderCreatePicture (dpy, pm, format, 0, 0); XRenderColor mask_c; @@ -404,11 +390,8 @@ mask_c.green = g; mask_c.blue = b; mask_c.alpha = a; - XRenderFillRectangle (dpy, PictOpSrc, src, &mask_c, 0, 0, 1, 1); - - XRenderComposite (dpy, PictOpMultiply, src, None, dst, 0, 0, 0, 0, 0, 0, w, h); + XRenderFillRectangle (dpy, PictOpMultiply, dst, &mask_c, 0, 0, w, h); - XRenderFreePicture (dpy, src); XRenderFreePicture (dpy, dst); } @@ -601,7 +584,13 @@ Display *dpy = s->display->dpy; Picture src = img->src_picture (); Picture dst = XRenderCreatePicture (dpy, img2->pm, img2->format, 0, 0); - Picture mask = create_xrender_mask (dpy, img->pm, False); + + Pixmap pixmap = XCreatePixmap (dpy, img->pm, 1, 1, 8); + XRenderPictFormat *format = XRenderFindStandardFormat (dpy, PictStandardA8); + XRenderPictureAttributes pa; + pa.repeat = True; + Picture mask = XRenderCreatePicture (dpy, pixmap, format, CPRepeat, &pa); + XFreePixmap (dpy, pixmap); XRenderColor mask_c;