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

Comparing rxvt-unicode/src/background.C (file contents):
Revision 1.192 by sf-exg, Fri Dec 30 12:45:56 2011 UTC vs.
Revision 1.193 by sf-exg, Sun Jan 1 14:31:29 2012 UTC

956 { 956 {
957 changed = true; 957 changed = true;
958 v_blurRadius = vr; 958 v_blurRadius = vr;
959 } 959 }
960 960
961 if (v_blurRadius == 0 && h_blurRadius == 0) 961 if (h_blurRadius == 0 || v_blurRadius == 0)
962 bg_flags &= ~BG_NEEDS_BLUR; 962 bg_flags &= ~BG_NEEDS_BLUR;
963 else 963 else
964 bg_flags |= BG_NEEDS_BLUR; 964 bg_flags |= BG_NEEDS_BLUR;
965 965
966 return changed; 966 return changed;
1061 Picture src = XRenderCreatePicture (dpy, pixmap, format, 0, 0); 1061 Picture src = XRenderCreatePicture (dpy, pixmap, format, 0, 0);
1062 Picture dst = XRenderCreatePicture (dpy, pixmap, format, 0, 0); 1062 Picture dst = XRenderCreatePicture (dpy, pixmap, format, 0, 0);
1063 1063
1064 if (kernel && params) 1064 if (kernel && params)
1065 { 1065 {
1066 if (h_blurRadius)
1067 {
1068 size = h_blurRadius * 2 + 1; 1066 size = h_blurRadius * 2 + 1;
1069 get_gaussian_kernel (h_blurRadius, size, kernel, params); 1067 get_gaussian_kernel (h_blurRadius, size, kernel, params);
1070 1068
1071 XRenderSetPictureFilter (dpy, src, FilterConvolution, params, size+2); 1069 XRenderSetPictureFilter (dpy, src, FilterConvolution, params, size+2);
1072 XRenderComposite (dpy, 1070 XRenderComposite (dpy,
1073 PictOpSrc, 1071 PictOpSrc,
1074 src, 1072 src,
1075 None, 1073 None,
1076 dst, 1074 dst,
1077 0, 0, 1075 0, 0,
1078 0, 0, 1076 0, 0,
1079 0, 0, 1077 0, 0,
1080 width, height); 1078 width, height);
1081 }
1082 1079
1083 if (v_blurRadius)
1084 {
1085 size = v_blurRadius * 2 + 1; 1080 size = v_blurRadius * 2 + 1;
1086 get_gaussian_kernel (v_blurRadius, size, kernel, params); 1081 get_gaussian_kernel (v_blurRadius, size, kernel, params);
1087 ::swap (params[0], params[1]); 1082 ::swap (params[0], params[1]);
1088 1083
1089 XRenderSetPictureFilter (dpy, src, FilterConvolution, params, size+2); 1084 XRenderSetPictureFilter (dpy, src, FilterConvolution, params, size+2);
1090 XRenderComposite (dpy, 1085 XRenderComposite (dpy,
1091 PictOpSrc, 1086 PictOpSrc,
1092 src, 1087 src,
1093 None, 1088 None,
1094 dst, 1089 dst,
1095 0, 0, 1090 0, 0,
1096 0, 0, 1091 0, 0,
1097 0, 0, 1092 0, 0,
1098 width, height); 1093 width, height);
1099 }
1100 1094
1101 ret = true; 1095 ret = true;
1102 } 1096 }
1103 1097
1104 free (kernel); 1098 free (kernel);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines