ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtimg.C
(Generate patch)

Comparing rxvt-unicode/src/rxvtimg.C (file contents):
Revision 1.32 by root, Thu Jun 7 07:53:12 2012 UTC vs.
Revision 1.55 by root, Thu Jun 7 20:26:21 2012 UTC

2#include "../config.h" 2#include "../config.h"
3#include "rxvt.h" 3#include "rxvt.h"
4 4
5#if HAVE_IMG 5#if HAVE_IMG
6 6
7rxvt_img::rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height) 7rxvt_img::rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int x, int y, int width, int height, int repeat)
8: s(screen), x(0), y(0), w(width), h(height), format(format), repeat(RepeatNormal), 8: s(screen), x(x), y(y), w(width), h(height), format(format), repeat(repeat),
9 pm(0), refcnt(0) 9 pm(0), ref(0)
10{ 10{
11} 11}
12 12
13rxvt_img::rxvt_img (const rxvt_img &img) 13rxvt_img::rxvt_img (const rxvt_img &img)
14: s(img.s), x(img.x), y(img.y), w(img.w), h(img.h), format(img.format), repeat(img.repeat), pm(img.pm), refcnt(img.refcnt) 14: s(img.s), x(img.x), y(img.y), w(img.w), h(img.h), format(img.format), repeat(img.repeat), pm(img.pm), ref(img.ref)
15{ 15{
16 if (refcnt)
17 ++*refcnt; 16 ++ref->cnt;
18} 17}
19 18
20#if 0 19#if 0
21rxvt_img::rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height, Pixmap pixmap) 20rxvt_img::rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height, Pixmap pixmap)
22: s(screen), x(0), y(0), w(width), h(height), format(format), repeat(RepeatNormal), shared(false), pm(pixmap) 21: s(screen), x(0), y(0), w(width), h(height), format(format), repeat(RepeatNormal), shared(false), pm(pixmap)
44 return 0; 43 return 0;
45 44
46 rxvt_img *img = new rxvt_img ( 45 rxvt_img *img = new rxvt_img (
47 s, 46 s,
48 XRenderFindVisualFormat (dpy, DefaultVisual (dpy, s->display->screen)), 47 XRenderFindVisualFormat (dpy, DefaultVisual (dpy, s->display->screen)),
48 0,
49 0,
49 root_pm_w, 50 root_pm_w,
50 root_pm_h 51 root_pm_h
51 ); 52 );
52 53
53 img->pm = root_pixmap; 54 img->pm = root_pixmap;
55 img->ref = new pixref (root_pm_w, root_pm_h);
56 img->ref->ours = false;
57
58 return img;
59}
60
61rxvt_img *
62rxvt_img::new_from_pixbuf (rxvt_screen *s, GdkPixbuf *pb)
63{
64 Display *dpy = s->display->dpy;
65
66 int width = gdk_pixbuf_get_width (pb);
67 int height = gdk_pixbuf_get_height (pb);
68
69 if (width > 32767 || height > 32767) // well, we *could* upload in chunks
70 rxvt_fatal ("rxvt_img::new_from_pixbuf: image too big (maximum size 32768x32768).\n");
71
72 // since we require rgb24/argb32 formats from xrender we assume
73 // that both 24 and 32 bpp MUST be supported by any screen that supports xrender
74 int depth = gdk_pixbuf_get_has_alpha (pb) ? 32 : 24;
75
76 int byte_order = ecb_big_endian () ? MSBFirst : LSBFirst;
77
78 XImage xi;
79
80 xi.width = width;
81 xi.height = height;
82 xi.xoffset = 0;
83 xi.format = ZPixmap;
84 xi.byte_order = ImageByteOrder (dpy);
85 xi.bitmap_unit = 0; //XY only, unused
86 xi.bitmap_bit_order = 0; //XY only, unused
87 xi.bitmap_pad = BitmapPad (dpy);
88 xi.depth = depth;
89 xi.bytes_per_line = 0;
90 xi.bits_per_pixel = 32; //Z only
91 xi.red_mask = 0x00000000; //Z only, unused
92 xi.green_mask = 0x00000000; //Z only, unused
93 xi.blue_mask = 0x00000000; //Z only, unused
94 xi.obdata = 0; // probably unused
95
96 bool byte_order_mismatch = byte_order != xi.byte_order;
97
98 if (!XInitImage (&xi))
99 rxvt_fatal ("unable to initialise ximage, please report.\n");
100
101 if (height > INT_MAX / xi.bytes_per_line)
102 rxvt_fatal ("rxvt_img::new_from_pixbuf: image too big for Xlib.\n");
103
104 xi.data = (char *)rxvt_malloc (height * xi.bytes_per_line);
105
106 int rowstride = gdk_pixbuf_get_rowstride (pb);
107
108 assert (3 + (depth == 32) == gdk_pixbuf_get_n_channels (pb));
109 unsigned char *row = gdk_pixbuf_get_pixels (pb);
110 char *line = xi.data;
111
112 for (int y = 0; y < height; y++)
113 {
114 unsigned char *src = row;
115 uint32_t *dst = (uint32_t *)line;
116
117 if (depth == 24)
118 for (int x = 0; x < width; x++)
119 {
120 uint8_t r = *src++;
121 uint8_t g = *src++;
122 uint8_t b = *src++;
123
124 uint32_t v = (r << 16) | (g << 8) | b;
125
126 if (ecb_big_endian ())
127 v = ecb_bswap32 (v);
128
129 if (byte_order_mismatch)
130 v = ecb_bswap32 (v);
131
132 *dst++ = v;
133 }
134 else
135 for (int x = 0; x < width; x++)
136 {
137 uint32_t v = *(uint32_t *)src; src += 4;
138
139 if (ecb_little_endian ())
140 v = ecb_bswap32 (v);
141
142 v = ecb_rotr32 (v, 8);
143
144 if (byte_order_mismatch)
145 v = ecb_bswap32 (v);
146
147 *dst++ = v;
148 }
149
150 row += rowstride;
151 line += xi.bytes_per_line;
152 }
153
154 rxvt_img *img = new rxvt_img (s, XRenderFindStandardFormat (dpy, depth == 24 ? PictStandardRGB24 : PictStandardARGB32), 0, 0, width, height);
155 img->alloc ();
156
157 GC gc = XCreateGC (dpy, img->pm, 0, 0);
158 XPutImage (dpy, img->pm, gc, &xi, 0, 0, 0, 0, width, height);
159 XFreeGC (dpy, gc);
160
161 free (xi.data);
54 162
55 return img; 163 return img;
56} 164}
57 165
58rxvt_img * 166rxvt_img *
62 GdkPixbuf *pb = gdk_pixbuf_new_from_file (filename, &err); 170 GdkPixbuf *pb = gdk_pixbuf_new_from_file (filename, &err);
63 171
64 if (!pb) 172 if (!pb)
65 rxvt_fatal ("rxvt_img::new_from_file: %s\n", err->message); 173 rxvt_fatal ("rxvt_img::new_from_file: %s\n", err->message);
66 174
67 rxvt_img *img = new rxvt_img ( 175 rxvt_img *img = new_from_pixbuf (s, pb);
68 s,
69 XRenderFindStandardFormat (s->display->dpy, gdk_pixbuf_get_has_alpha (pb) ? PictStandardARGB32 : PictStandardRGB24),
70 gdk_pixbuf_get_width (pb),
71 gdk_pixbuf_get_height (pb)
72 );
73 img->alloc ();
74 img->render_pixbuf (pb, 0, 0, img->w, img->h, 0, 0);
75 176
76 g_object_unref (pb); 177 g_object_unref (pb);
77 178
78 return img; 179 return img;
79} 180}
80 181
81void 182void
82rxvt_img::destroy () 183rxvt_img::destroy ()
83{ 184{
84 if (!refcnt || --*refcnt) 185 if (--ref->cnt)
85 return; 186 return;
86 187
87 if (pm) 188 if (pm && ref->ours)
88 XFreePixmap (s->display->dpy, pm); 189 XFreePixmap (s->display->dpy, pm);
89 190
90 delete refcnt; 191 delete ref;
91} 192}
92 193
93rxvt_img::~rxvt_img () 194rxvt_img::~rxvt_img ()
94{ 195{
95 destroy (); 196 destroy ();
97 198
98void 199void
99rxvt_img::alloc () 200rxvt_img::alloc ()
100{ 201{
101 pm = XCreatePixmap (s->display->dpy, s->display->root, w, h, format->depth); 202 pm = XCreatePixmap (s->display->dpy, s->display->root, w, h, format->depth);
102 refcnt = new int (1); 203 ref = new pixref (w, h);
204}
205
206Picture
207rxvt_img::src_picture ()
208{
209 Display *dpy = s->display->dpy;
210
211 XRenderPictureAttributes pa;
212 pa.repeat = repeat;
213 Picture pic = XRenderCreatePicture (dpy, pm, format, CPRepeat, &pa);
214
215 return pic;
103} 216}
104 217
105void 218void
106rxvt_img::unshare () 219rxvt_img::unshare ()
107{ 220{
108 if (refcnt && *refcnt == 1) 221 if (ref->cnt == 1 && ref->ours)
109 return; 222 return;
110 223
224 //TODO: maybe should reify instead
111 Pixmap pm2 = XCreatePixmap (s->display->dpy, s->display->root, w, h, format->depth); 225 Pixmap pm2 = XCreatePixmap (s->display->dpy, s->display->root, ref->w, ref->h, format->depth);
112 GC gc = XCreateGC (s->display->dpy, pm, 0, 0); 226 GC gc = XCreateGC (s->display->dpy, pm, 0, 0);
113 XCopyArea (s->display->dpy, pm, pm2, gc, 0, 0, w, h, 0, 0); 227 XCopyArea (s->display->dpy, pm, pm2, gc, 0, 0, ref->w, ref->h, 0, 0);
114 XFreeGC (s->display->dpy, gc); 228 XFreeGC (s->display->dpy, gc);
115 229
116 destroy (); 230 destroy ();
117 231
118 pm = pm2; 232 pm = pm2;
119 refcnt = new int (1); 233 ref = new pixref (ref->w, ref->h);
120} 234}
121 235
122void 236void
123rxvt_img::fill (const rxvt_color &c) 237rxvt_img::fill (const rxvt_color &c)
124{ 238{
158 272
159 Display *dpy = s->display->dpy; 273 Display *dpy = s->display->dpy;
160 int size = max (rh, rv) * 2 + 1; 274 int size = max (rh, rv) * 2 + 1;
161 double *kernel = (double *)malloc (size * sizeof (double)); 275 double *kernel = (double *)malloc (size * sizeof (double));
162 XFixed *params = (XFixed *)malloc ((size + 2) * sizeof (XFixed)); 276 XFixed *params = (XFixed *)malloc ((size + 2) * sizeof (XFixed));
163 rxvt_img *img = new rxvt_img (s, format, w, h); 277 rxvt_img *img = new rxvt_img (s, format, x, y, w, h, repeat);
164 img->alloc (); 278 img->alloc ();
165 279
280 Picture src = src_picture ();
281
166 XRenderPictureAttributes pa; 282 XRenderPictureAttributes pa;
167
168 pa.repeat = RepeatPad; 283 pa.repeat = RepeatPad;
169 Picture src = XRenderCreatePicture (dpy, pm , format, CPRepeat, &pa);
170 Picture dst = XRenderCreatePicture (dpy, img->pm, format, CPRepeat, &pa); 284 Picture dst = XRenderCreatePicture (dpy, img->pm, format, CPRepeat, &pa);
171 285
172 Pixmap tmp_pm = XCreatePixmap (dpy, pm, w, h, format->depth); 286 Pixmap tmp_pm = XCreatePixmap (dpy, pm, w, h, format->depth);
173 Picture tmp = XRenderCreatePicture (dpy, tmp_pm , format, CPRepeat, &pa); 287 Picture tmp = XRenderCreatePicture (dpy, tmp_pm , format, CPRepeat, &pa);
174 XFreePixmap (dpy, tmp_pm); 288 XFreePixmap (dpy, tmp_pm);
270 384
271 XRenderFreePicture (dpy, src); 385 XRenderFreePicture (dpy, src);
272 XRenderFreePicture (dpy, dst); 386 XRenderFreePicture (dpy, dst);
273} 387}
274 388
275bool 389rxvt_img *
276rxvt_img::render_pixbuf (GdkPixbuf *pixbuf, int src_x, int src_y, int width, int height, int dst_x, int dst_y) 390rxvt_img::clone ()
277{ 391{
278 Display *dpy = s->display->dpy; 392 return new rxvt_img (*this);
393}
279 394
280 if (s->visual->c_class != TrueColor) 395static XRenderPictFormat *
396find_alpha_format_for (Display *dpy, XRenderPictFormat *format)
397{
398 if (format->direct.alphaMask)
399 return format; // already has alpha
400
401 // try to find a suitable alpha format, one bit alpha is enough for our purposes
402 if (format->type == PictTypeDirect)
403 for (int n = 0; XRenderPictFormat *f = XRenderFindFormat (dpy, 0, 0, n); ++n)
404 if (f->direct.alphaMask
405 && f->type == PictTypeDirect
406 && ecb_popcount32 (f->direct.redMask ) >= ecb_popcount32 (format->direct.redMask )
407 && ecb_popcount32 (f->direct.greenMask) >= ecb_popcount32 (format->direct.greenMask)
408 && ecb_popcount32 (f->direct.blueMask ) >= ecb_popcount32 (format->direct.blueMask ))
281 return false; 409 return f;
282 410
283 uint32_t red_mask, green_mask, blue_mask, alpha_mask; 411 // should be a very good fallback
412 return XRenderFindStandardFormat (dpy, PictStandardARGB32);
413}
284 414
285 red_mask = (uint32_t)format->direct.redMask << format->direct.red; 415rxvt_img *
286 green_mask = (uint32_t)format->direct.greenMask << format->direct.green; 416rxvt_img::reify ()
287 blue_mask = (uint32_t)format->direct.blueMask << format->direct.blue; 417{
288 alpha_mask = (uint32_t)format->direct.alphaMask << format->direct.alpha; 418 if (x == 0 && y == 0 && w == ref->w && h == ref->h)
289
290 int width_r = ecb_popcount32 (red_mask);
291 int width_g = ecb_popcount32 (green_mask);
292 int width_b = ecb_popcount32 (blue_mask);
293 int width_a = ecb_popcount32 (alpha_mask);
294
295 if (width_r > 8 || width_g > 8 || width_b > 8 || width_a > 8)
296 return false; 419 return clone ();
297 420
298 int sh_r = ecb_ctz32 (red_mask); 421 Display *dpy = s->display->dpy;
299 int sh_g = ecb_ctz32 (green_mask);
300 int sh_b = ecb_ctz32 (blue_mask);
301 int sh_a = ecb_ctz32 (alpha_mask);
302 422
303 if (width > 32767 || height > 32767) 423 bool alpha = !format->direct.alphaMask
304 return false; 424 && (x || y)
425 && repeat == RepeatNone;
305 426
306 XImage *ximage = XCreateImage (dpy, s->visual, format->depth, ZPixmap, 0, 0, 427 rxvt_img *img = new rxvt_img (s, alpha ? find_alpha_format_for (dpy, format) : format, 0, 0, w, h, repeat);
307 width, height, 32, 0); 428 img->alloc ();
308 if (!ximage)
309 return false;
310 429
311 if (height > INT_MAX / ximage->bytes_per_line 430 Picture src = src_picture ();
312 || !(ximage->data = (char *)malloc (height * ximage->bytes_per_line))) 431 Picture dst = XRenderCreatePicture (dpy, img->pm, img->format, 0, 0);
432
433 if (alpha)
313 { 434 {
314 XDestroyImage (ximage); 435 XRenderColor rc = { 0, 0, 0, 0 };
315 return false; 436 XRenderFillRectangle (dpy, PictOpSrc, dst, &rc, 0, 0, w, h);//TODO: split into four fillrectangles
437 XRenderComposite (dpy, PictOpSrc, src, None, dst, 0, 0, 0, 0, -x, -y, ref->w, ref->h);
316 } 438 }
439 else
440 XRenderComposite (dpy, PictOpSrc, src, None, dst, x, y, 0, 0, 0, 0, w, h);
317 441
318 GC gc = XCreateGC (dpy, pm, 0, 0); 442 XRenderFreePicture (dpy, src);
443 XRenderFreePicture (dpy, dst);
319 444
320 ximage->byte_order = ecb_big_endian () ? MSBFirst : LSBFirst; 445 return img;
446}
321 447
322 int rowstride = gdk_pixbuf_get_rowstride (pixbuf); 448rxvt_img *
323 int channels = gdk_pixbuf_get_n_channels (pixbuf); 449rxvt_img::sub_rect (int x, int y, int width, int height)
324 unsigned char *row = gdk_pixbuf_get_pixels (pixbuf) + src_y * rowstride + src_x * channels; 450{
325 char *line = ximage->data; 451 rxvt_img *img = clone ();
326 452
327 for (int y = 0; y < height; y++) 453 img->x += x;
454 img->y += y;
455
456 if (w != width || h != height)
328 { 457 {
329 for (int x = 0; x < width; x++) 458 img->w = width;
330 { 459 img->h = height;
331 unsigned char *pixel = row + x * channels;
332 uint32_t value;
333 unsigned char r, g, b, a;
334 460
335 if (channels == 4) 461 rxvt_img *img2 = img->reify ();
336 { 462 delete img;
337 a = pixel[3]; 463 img = img2;
338 r = pixel[0] * a / 0xff;
339 g = pixel[1] * a / 0xff;
340 b = pixel[2] * a / 0xff;
341 }
342 else
343 {
344 a = 0xff;
345 r = pixel[0];
346 g = pixel[1];
347 b = pixel[2];
348 }
349
350 value = ((r >> (8 - width_r)) << sh_r)
351 | ((g >> (8 - width_g)) << sh_g)
352 | ((b >> (8 - width_b)) << sh_b)
353 | ((a >> (8 - width_a)) << sh_a);
354
355 if (ximage->bits_per_pixel == 32)
356 ((uint32_t *)line)[x] = value;
357 else
358 XPutPixel (ximage, x, y, value);
359 }
360
361 row += rowstride;
362 line += ximage->bytes_per_line;
363 } 464 }
364 465
365 XPutImage (dpy, pm, gc, ximage, 0, 0, dst_x, dst_y, width, height); 466 return img;
366 XDestroyImage (ximage);
367 XFreeGC (dpy, gc);
368
369 return true;
370} 467}
371 468
372rxvt_img * 469rxvt_img *
373rxvt_img::clone () 470rxvt_img::transform (int new_width, int new_height, double matrix[9])
374{ 471{
375 return new rxvt_img (*this);
376}
377
378rxvt_img *
379rxvt_img::sub_rect (int x, int y, int width, int height)
380{
381 rxvt_img *img = new rxvt_img (s, format, width, height); 472 rxvt_img *img = new rxvt_img (s, format, 0, 0, new_width, new_height, repeat);
382 img->alloc (); 473 img->alloc ();
383 474
384 Display *dpy = s->display->dpy; 475 Display *dpy = s->display->dpy;
385 XRenderPictureAttributes pa; 476 Picture src = src_picture ();
386 pa.repeat = repeat;
387 Picture src = XRenderCreatePicture (dpy, pm, format, CPRepeat, &pa);
388 Picture dst = XRenderCreatePicture (dpy, img->pm, img->format, 0, 0); 477 Picture dst = XRenderCreatePicture (dpy, img->pm, img->format, 0, 0);
389
390 XRenderComposite (dpy, PictOpSrc, src, None, dst, x, y, 0, 0, 0, 0, width, height);
391
392 XRenderFreePicture (dpy, src);
393 XRenderFreePicture (dpy, dst);
394
395 return img;
396}
397
398rxvt_img *
399rxvt_img::transform (int new_width, int new_height, double matrix[9])
400{
401 rxvt_img *img = new rxvt_img (s, format, new_width, new_height);
402 img->alloc ();
403
404 Display *dpy = s->display->dpy;
405 XRenderPictureAttributes pa;
406 pa.repeat = repeat;
407 Picture src = XRenderCreatePicture (dpy, pm, format, CPRepeat, &pa);
408 Picture dst = XRenderCreatePicture (dpy, img->pm, img->format, 0, 0);
409 478
410 XTransform xfrm; 479 XTransform xfrm;
411 480
412 for (int i = 0; i < 3; ++i) 481 for (int i = 0; i < 3; ++i)
413 for (int j = 0; j < 3; ++j) 482 for (int j = 0; j < 3; ++j)
414 xfrm.matrix [i][j] = XDoubleToFixed (matrix [i * 3 + j]); 483 xfrm.matrix [i][j] = XDoubleToFixed (matrix [i * 3 + j]);
415 484
485#if 0
486 xfrm.matrix [0][2] -= XDoubleToFixed (x);//TODO
487 xfrm.matrix [1][2] -= XDoubleToFixed (y);
488#endif
489
416 XRenderSetPictureFilter (dpy, src, "good", 0, 0); 490 XRenderSetPictureFilter (dpy, src, "good", 0, 0);
417 XRenderSetPictureTransform (dpy, src, &xfrm); 491 XRenderSetPictureTransform (dpy, src, &xfrm);
418 XRenderComposite (dpy, PictOpSrc, src, None, dst, 0, 0, 0, 0, 0, 0, new_width, new_height); 492 XRenderComposite (dpy, PictOpSrc, src, None, dst, 0, 0, 0, 0, 0, 0, new_width, new_height);
419 493
420 XRenderFreePicture (dpy, src); 494 XRenderFreePicture (dpy, src);
424} 498}
425 499
426rxvt_img * 500rxvt_img *
427rxvt_img::scale (int new_width, int new_height) 501rxvt_img::scale (int new_width, int new_height)
428{ 502{
503 if (w == new_width && h == new_height)
504 return clone ();
505
429 double matrix[9] = { 506 double matrix[9] = {
430 w / (double)new_width, 0, 0, 507 w / (double)new_width, 0, 0,
431 0, h / (double)new_height, 0, 508 0, h / (double)new_height, 0,
432 0, 0, 1 509 0, 0, 1
433 }; 510 };
434 511
512 int old_repeat_mode = repeat;
513 repeat = RepeatPad; // not right, but xrender can't proeprly scale it seems
514
435 return transform (new_width, new_height, matrix); 515 rxvt_img *img = transform (new_width, new_height, matrix);
516
517 repeat = old_repeat_mode;
518 img->repeat = repeat;
519
520 return img;
436} 521}
437 522
438rxvt_img * 523rxvt_img *
439rxvt_img::rotate (int new_width, int new_height, int x, int y, double phi) 524rxvt_img::rotate (int new_width, int new_height, int x, int y, double phi)
440{ 525{
449 534
450 return transform (new_width, new_height, matrix); 535 return transform (new_width, new_height, matrix);
451} 536}
452 537
453rxvt_img * 538rxvt_img *
454rxvt_img::convert_to (XRenderPictFormat *new_format, const rxvt_color &bg) 539rxvt_img::convert_format (XRenderPictFormat *new_format, const rxvt_color &bg)
455{ 540{
456 if (new_format == format) 541 if (new_format == format)
457 return clone (); 542 return clone ();
458 543
459 rxvt_img *img = new rxvt_img (s, new_format, w, h); 544 rxvt_img *img = new rxvt_img (s, new_format, x, y, w, h, repeat);
460 img->alloc (); 545 img->alloc ();
461 546
462 Display *dpy = s->display->dpy; 547 Display *dpy = s->display->dpy;
463 Picture src = XRenderCreatePicture (dpy, pm, format, 0, 0); 548 Picture src = src_picture ();
464 Picture dst = XRenderCreatePicture (dpy, img->pm, new_format, 0, 0); 549 Picture dst = XRenderCreatePicture (dpy, img->pm, new_format, 0, 0);
465 int op = PictOpSrc; 550 int op = PictOpSrc;
466 551
467 if (format->direct.alphaMask && !new_format->direct.alphaMask) 552 if (format->direct.alphaMask && !new_format->direct.alphaMask)
468 { 553 {
487rxvt_img * 572rxvt_img *
488rxvt_img::blend (rxvt_img *img, double factor) 573rxvt_img::blend (rxvt_img *img, double factor)
489{ 574{
490 rxvt_img *img2 = clone (); 575 rxvt_img *img2 = clone ();
491 Display *dpy = s->display->dpy; 576 Display *dpy = s->display->dpy;
492 Picture src = XRenderCreatePicture (dpy, img->pm, img->format, 0, 0); 577 Picture src = img->src_picture ();
493 Picture dst = XRenderCreatePicture (dpy, img2->pm, img2->format, 0, 0); 578 Picture dst = XRenderCreatePicture (dpy, img2->pm, img2->format, 0, 0);
494 Picture mask = create_xrender_mask (dpy, img->pm, False); 579 Picture mask = create_xrender_mask (dpy, img->pm, False);
495 580
496 XRenderColor mask_c; 581 XRenderColor mask_c;
497 582

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines