… | |
… | |
666 | if (result) |
666 | if (result) |
667 | { |
667 | { |
668 | XGCValues gcv; |
668 | XGCValues gcv; |
669 | GC gc; |
669 | GC gc; |
670 | |
670 | |
671 | if (pixmap) |
|
|
672 | { |
|
|
673 | if (pmap_width != new_pmap_width |
|
|
674 | || pmap_height != new_pmap_height |
|
|
675 | || pmap_depth != target->depth) |
|
|
676 | { |
|
|
677 | XFreePixmap (target->dpy, pixmap); |
|
|
678 | pixmap = None; |
|
|
679 | } |
|
|
680 | } |
|
|
681 | |
|
|
682 | /* create Pixmap */ |
671 | /* create Pixmap */ |
683 | if (pixmap == None) |
672 | if (pixmap == None |
|
|
673 | || pmap_width != new_pmap_width |
|
|
674 | || pmap_height != new_pmap_height |
|
|
675 | || pmap_depth != target->depth) |
684 | { |
676 | { |
|
|
677 | if (pixmap) |
|
|
678 | XFreePixmap (target->dpy, pixmap); |
685 | pixmap = XCreatePixmap (target->dpy, target->vt, new_pmap_width, new_pmap_height, target->depth); |
679 | pixmap = XCreatePixmap (target->dpy, target->vt, new_pmap_width, new_pmap_height, target->depth); |
686 | pmap_width = new_pmap_width; |
680 | pmap_width = new_pmap_width; |
687 | pmap_height = new_pmap_height; |
681 | pmap_height = new_pmap_height; |
688 | pmap_depth = target->depth; |
682 | pmap_depth = target->depth; |
689 | } |
683 | } |
… | |
… | |
797 | new_pmap_width = min (image_width, target_width); |
791 | new_pmap_width = min (image_width, target_width); |
798 | new_pmap_height = min (image_height, target_height); |
792 | new_pmap_height = min (image_height, target_height); |
799 | } |
793 | } |
800 | } |
794 | } |
801 | |
795 | |
802 | if (pixmap) |
|
|
803 | { |
|
|
804 | if (pmap_width != new_pmap_width |
|
|
805 | || pmap_height != new_pmap_height |
|
|
806 | || pmap_depth != target->depth) |
|
|
807 | { |
|
|
808 | XFreePixmap (target->dpy, pixmap); |
|
|
809 | pixmap = None; |
|
|
810 | } |
|
|
811 | } |
|
|
812 | |
|
|
813 | if (pixmap == None) |
796 | if (pixmap == None |
|
|
797 | || pmap_width != new_pmap_width |
|
|
798 | || pmap_height != new_pmap_height |
|
|
799 | || pmap_depth != target->depth) |
814 | { |
800 | { |
|
|
801 | if (pixmap) |
|
|
802 | XFreePixmap (target->dpy, pixmap); |
815 | pixmap = XCreatePixmap (target->dpy, target->vt, new_pmap_width, new_pmap_height, target->depth); |
803 | pixmap = XCreatePixmap (target->dpy, target->vt, new_pmap_width, new_pmap_height, target->depth); |
816 | pmap_width = new_pmap_width; |
804 | pmap_width = new_pmap_width; |
817 | pmap_height = new_pmap_height; |
805 | pmap_height = new_pmap_height; |
818 | pmap_depth = target->depth; |
806 | pmap_depth = target->depth; |
819 | } |
807 | } |
… | |
… | |
1239 | |
1227 | |
1240 | if (mask_pic && overlay_pic && back_pic) |
1228 | if (mask_pic && overlay_pic && back_pic) |
1241 | { |
1229 | { |
1242 | XRenderColor mask_c; |
1230 | XRenderColor mask_c; |
1243 | |
1231 | |
1244 | memset (&mask_c, (shade > 100) ? 0xFF : 0x0, sizeof (mask_c)); |
1232 | mask_c.red = mask_c.green = mask_c.blue = shade > 100 ? 0xffff : 0; |
1245 | mask_c.alpha = 0xffff; |
1233 | mask_c.alpha = 0xffff; |
1246 | XRenderFillRectangle (dpy, PictOpSrc, overlay_pic, &mask_c, 0, 0, 1, 1); |
1234 | XRenderFillRectangle (dpy, PictOpSrc, overlay_pic, &mask_c, 0, 0, 1, 1); |
1247 | |
1235 | |
1248 | mask_c.alpha = 0; |
1236 | mask_c.alpha = 0; |
1249 | mask_c.red = 0xffff - c.r; |
1237 | mask_c.red = 0xffff - c.r; |
… | |
… | |
1367 | if (gc) |
1355 | if (gc) |
1368 | { |
1356 | { |
1369 | XFillRectangle (dpy, tiled_root_pmap, gc, 0, 0, window_width, window_height); |
1357 | XFillRectangle (dpy, tiled_root_pmap, gc, 0, 0, window_width, window_height); |
1370 | result |= transpPmapTiled; |
1358 | result |= transpPmapTiled; |
1371 | XFreeGC (dpy, gc); |
1359 | XFreeGC (dpy, gc); |
1372 | } |
|
|
1373 | |
1360 | |
1374 | if (tiled_root_pmap != None) |
|
|
1375 | { |
|
|
1376 | if (!need_client_side_rendering ()) |
1361 | if (!need_client_side_rendering ()) |
1377 | { |
1362 | { |
1378 | if ((flags & blurNeeded) |
1363 | if ((flags & blurNeeded) |
1379 | && (flags & HAS_RENDER_CONV)) |
1364 | && (flags & HAS_RENDER_CONV)) |
1380 | { |
1365 | { |
… | |
… | |
1395 | pixmap = tiled_root_pmap; |
1380 | pixmap = tiled_root_pmap; |
1396 | pmap_width = window_width; |
1381 | pmap_width = window_width; |
1397 | pmap_height = window_height; |
1382 | pmap_height = window_height; |
1398 | pmap_depth = target->depth; |
1383 | pmap_depth = target->depth; |
1399 | } |
1384 | } |
|
|
1385 | else |
|
|
1386 | XFreePixmap (dpy, tiled_root_pmap); |
1400 | |
1387 | |
1401 | if (recoded_root_pmap != root_pixmap) |
1388 | if (recoded_root_pmap != root_pixmap) |
1402 | XFreePixmap (dpy, recoded_root_pmap); |
1389 | XFreePixmap (dpy, recoded_root_pmap); |
1403 | |
1390 | |
1404 | return result; |
1391 | return result; |