… | |
… | |
819 | } |
819 | } |
820 | |
820 | |
821 | #if XRENDER |
821 | #if XRENDER |
822 | if (tr_flags) |
822 | if (tr_flags) |
823 | { |
823 | { |
824 | XRenderPictureAttributes pa; |
|
|
825 | XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual); |
824 | XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual); |
826 | |
825 | |
827 | Picture src = XRenderCreatePicture (dpy, root_pmap, format, 0, &pa); |
826 | Picture src = XRenderCreatePicture (dpy, root_pmap, format, 0, 0); |
828 | |
827 | |
829 | Picture dst = XRenderCreatePicture (dpy, bg_pixmap, format, 0, &pa); |
828 | Picture dst = XRenderCreatePicture (dpy, bg_pixmap, format, 0, 0); |
830 | |
829 | |
831 | Picture mask = create_xrender_mask (dpy, vt, False, False); |
830 | Picture mask = create_xrender_mask (dpy, vt, False, False); |
832 | |
831 | |
833 | XRenderColor mask_c; |
832 | XRenderColor mask_c; |
834 | |
833 | |
… | |
… | |
1054 | |
1053 | |
1055 | int size = max (h_blurRadius, v_blurRadius) * 2 + 1; |
1054 | int size = max (h_blurRadius, v_blurRadius) * 2 + 1; |
1056 | double *kernel = (double *)malloc (size * sizeof (double)); |
1055 | double *kernel = (double *)malloc (size * sizeof (double)); |
1057 | XFixed *params = (XFixed *)malloc ((size + 2) * sizeof (XFixed)); |
1056 | XFixed *params = (XFixed *)malloc ((size + 2) * sizeof (XFixed)); |
1058 | |
1057 | |
1059 | XRenderPictureAttributes pa; |
|
|
1060 | XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual); |
1058 | XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual); |
1061 | |
1059 | |
1062 | Picture src = XRenderCreatePicture (dpy, pixmap, format, 0, &pa); |
1060 | Picture src = XRenderCreatePicture (dpy, pixmap, format, 0, 0); |
1063 | Picture dst = XRenderCreatePicture (dpy, pixmap, format, 0, &pa); |
1061 | Picture dst = XRenderCreatePicture (dpy, pixmap, format, 0, 0); |
1064 | |
1062 | |
1065 | if (kernel && params) |
1063 | if (kernel && params) |
1066 | { |
1064 | { |
1067 | if (h_blurRadius) |
1065 | if (h_blurRadius) |
1068 | { |
1066 | { |
… | |
… | |
1153 | c.g = c.g * (200 - shade) / 100; |
1151 | c.g = c.g * (200 - shade) / 100; |
1154 | c.b = c.b * (200 - shade) / 100; |
1152 | c.b = c.b * (200 - shade) / 100; |
1155 | } |
1153 | } |
1156 | |
1154 | |
1157 | XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual); |
1155 | XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual); |
1158 | XRenderPictureAttributes pa; |
|
|
1159 | |
1156 | |
1160 | Picture back_pic = XRenderCreatePicture (dpy, pixmap, format, 0, &pa); |
1157 | Picture back_pic = XRenderCreatePicture (dpy, pixmap, format, 0, 0); |
1161 | |
1158 | |
1162 | Picture overlay_pic = create_xrender_mask (dpy, pixmap, True, False); |
1159 | Picture overlay_pic = create_xrender_mask (dpy, pixmap, True, False); |
1163 | |
1160 | |
1164 | Picture mask_pic = create_xrender_mask (dpy, pixmap, True, True); |
1161 | Picture mask_pic = create_xrender_mask (dpy, pixmap, True, True); |
1165 | |
1162 | |
… | |
… | |
1252 | #if XRENDER |
1249 | #if XRENDER |
1253 | if (bg_flags & BG_HAS_RENDER) |
1250 | if (bg_flags & BG_HAS_RENDER) |
1254 | { |
1251 | { |
1255 | recoded_root_pmap = XCreatePixmap (dpy, vt, root_pmap_width, root_pmap_height, depth); |
1252 | recoded_root_pmap = XCreatePixmap (dpy, vt, root_pmap_width, root_pmap_height, depth); |
1256 | |
1253 | |
1257 | XRenderPictureAttributes pa; |
|
|
1258 | |
|
|
1259 | XRenderPictFormat *src_format = XRenderFindVisualFormat (dpy, DefaultVisual (dpy, screen)); |
1254 | XRenderPictFormat *src_format = XRenderFindVisualFormat (dpy, DefaultVisual (dpy, screen)); |
1260 | Picture src = XRenderCreatePicture (dpy, root_pixmap, src_format, 0, &pa); |
1255 | Picture src = XRenderCreatePicture (dpy, root_pixmap, src_format, 0, 0); |
1261 | |
1256 | |
1262 | XRenderPictFormat *dst_format = XRenderFindVisualFormat (dpy, visual); |
1257 | XRenderPictFormat *dst_format = XRenderFindVisualFormat (dpy, visual); |
1263 | Picture dst = XRenderCreatePicture (dpy, recoded_root_pmap, dst_format, 0, &pa); |
1258 | Picture dst = XRenderCreatePicture (dpy, recoded_root_pmap, dst_format, 0, 0); |
1264 | |
1259 | |
1265 | XRenderComposite (dpy, PictOpSrc, src, None, dst, 0, 0, 0, 0, 0, 0, root_pmap_width, root_pmap_height); |
1260 | XRenderComposite (dpy, PictOpSrc, src, None, dst, 0, 0, 0, 0, 0, 0, root_pmap_width, root_pmap_height); |
1266 | |
1261 | |
1267 | XRenderFreePicture (dpy, src); |
1262 | XRenderFreePicture (dpy, src); |
1268 | XRenderFreePicture (dpy, dst); |
1263 | XRenderFreePicture (dpy, dst); |