… | |
… | |
397 | } |
397 | } |
398 | |
398 | |
399 | rxvt_img * |
399 | rxvt_img * |
400 | rxvt_img::reify () |
400 | rxvt_img::reify () |
401 | { |
401 | { |
|
|
402 | if (x == 0 && y == 0 && w == ref->w && h == ref->h) |
|
|
403 | return clone (); |
|
|
404 | |
402 | rxvt_img *img = new rxvt_img (s, format, 0, 0, w, h); |
405 | rxvt_img *img = new rxvt_img (s, format, 0, 0, w, h); |
403 | img->alloc (); |
406 | img->alloc (); |
404 | |
|
|
405 | // todo, if x==0 and y==0 and w==real width we could clone |
|
|
406 | // but that involves an rtt to find pixmap width. |
|
|
407 | |
407 | |
408 | Display *dpy = s->display->dpy; |
408 | Display *dpy = s->display->dpy; |
409 | |
409 | |
410 | Picture src = src_picture (); |
410 | Picture src = src_picture (); |
411 | Picture dst = XRenderCreatePicture (dpy, img->pm, img->format, 0, 0); |
411 | Picture dst = XRenderCreatePicture (dpy, img->pm, img->format, 0, 0); |