--- rxvt-unicode/src/rxvtimg.C 2012/06/09 14:18:53 1.71 +++ 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) { @@ -597,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;