--- rxvt-unicode/src/rxvtimg.C 2012/06/09 11:15:29 1.69 +++ rxvt-unicode/src/rxvtimg.C 2012/06/09 14:18:53 1.71 @@ -359,8 +359,7 @@ Picture dst = XRenderCreatePicture (dpy, pm, format, 0, 0); // loop should not be needed for brightness, as only -1..1 makes sense - - while (r | g | b | a) + //while (r | g | b | a) { unsigned short xr, xg, xb, xa; XRenderColor mask_c; @@ -372,7 +371,7 @@ { XRenderColor mask_w = { 65535, 65535, 65535, 65535 }; XRenderFillRectangle (dpy, PictOpDifference, dst, &mask_w, 0, 0, w, h); - mask_c.red = -mask_c.red; + mask_c.red = -mask_c.red; //TODO: verify that doing clamp, assign, and negation does the right thing mask_c.green = -mask_c.green; mask_c.blue = -mask_c.blue; mask_c.alpha = -mask_c.alpha; @@ -397,7 +396,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; @@ -405,11 +403,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); }