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.100 by sf-exg, Sat Oct 30 23:15:14 2010 UTC vs.
Revision 1.101 by sf-exg, Sun Oct 31 08:28:04 2010 UTC

729 return false; 729 return false;
730 730
731 if (!pixbuf) 731 if (!pixbuf)
732 return false; 732 return false;
733 733
734#if !XFT 734#if !XRENDER
735 if (background_flags) 735 if (background_flags)
736 return false; 736 return false;
737#endif 737#endif
738 738
739 GdkPixbuf *result; 739 GdkPixbuf *result;
856 dst_width, dst_height, 856 dst_width, dst_height,
857 XLIB_RGB_DITHER_NONE, 857 XLIB_RGB_DITHER_NONE,
858 0, 0); 858 0, 0);
859 } 859 }
860 860
861#if XFT 861#if XRENDER
862 if (background_flags) 862 if (background_flags)
863 { 863 {
864 Display *dpy = target->dpy; 864 Display *dpy = target->dpy;
865 XRenderPictureAttributes pa; 865 XRenderPictureAttributes pa;
866 866
1000 if (v_blurRadius == 0 && h_blurRadius == 0) 1000 if (v_blurRadius == 0 && h_blurRadius == 0)
1001 flags &= ~blurNeeded; 1001 flags &= ~blurNeeded;
1002 else 1002 else
1003 flags |= blurNeeded; 1003 flags |= blurNeeded;
1004 1004
1005#if XFT 1005#if XRENDER
1006 XFilters *filters = XRenderQueryFilters (target->dpy, target->display->root); 1006 XFilters *filters = XRenderQueryFilters (target->dpy, target->display->root);
1007 if (filters) 1007 if (filters)
1008 { 1008 {
1009 for (int i = 0; i < filters->nfilter; i++) 1009 for (int i = 0; i < filters->nfilter; i++)
1010 if (!strcmp (filters->filter[i], FilterConvolution)) 1010 if (!strcmp (filters->filter[i], FilterConvolution))
1050 { 1050 {
1051 if (flags & bgPixmap_t::tintWholesome) 1051 if (flags & bgPixmap_t::tintWholesome)
1052 flags |= bgPixmap_t::tintServerSide; 1052 flags |= bgPixmap_t::tintServerSide;
1053 else 1053 else
1054 { 1054 {
1055#if XFT 1055#if XRENDER
1056 flags |= bgPixmap_t::tintServerSide; 1056 flags |= bgPixmap_t::tintServerSide;
1057#endif 1057#endif
1058 } 1058 }
1059 } 1059 }
1060 1060
1107 } 1107 }
1108 1108
1109 return false; 1109 return false;
1110} 1110}
1111 1111
1112#if XFT 1112#if XRENDER
1113static void 1113static void
1114get_gaussian_kernel (int radius, int width, double *kernel, XFixed *params) 1114get_gaussian_kernel (int radius, int width, double *kernel, XFixed *params)
1115{ 1115{
1116 double sigma = radius / 2.0; 1116 double sigma = radius / 2.0;
1117 double scale = sqrt (2.0 * M_PI) * sigma; 1117 double scale = sqrt (2.0 * M_PI) * sigma;
1134 1134
1135bool 1135bool
1136bgPixmap_t::blur_pixmap (Pixmap pixmap, Visual *visual, int width, int height) 1136bgPixmap_t::blur_pixmap (Pixmap pixmap, Visual *visual, int width, int height)
1137{ 1137{
1138 bool ret = false; 1138 bool ret = false;
1139#if XFT 1139#if XRENDER
1140 int size = max (h_blurRadius, v_blurRadius) * 2 + 1; 1140 int size = max (h_blurRadius, v_blurRadius) * 2 + 1;
1141 double *kernel = (double *)malloc (size * sizeof (double)); 1141 double *kernel = (double *)malloc (size * sizeof (double));
1142 XFixed *params = (XFixed *)malloc ((size + 2) * sizeof (XFixed)); 1142 XFixed *params = (XFixed *)malloc ((size + 2) * sizeof (XFixed));
1143 1143
1144 Display *dpy = target->dpy; 1144 Display *dpy = target->dpy;
1221 XFreeGC (dpy, gc); 1221 XFreeGC (dpy, gc);
1222 } 1222 }
1223 } 1223 }
1224 else 1224 else
1225 { 1225 {
1226# if XFT 1226# if XRENDER
1227 rgba c (rgba::MAX_CC,rgba::MAX_CC,rgba::MAX_CC); 1227 rgba c (rgba::MAX_CC,rgba::MAX_CC,rgba::MAX_CC);
1228 1228
1229 if (flags & tintSet) 1229 if (flags & tintSet)
1230 tint.get (c); 1230 tint.get (c);
1231 1231
1442 result = XGetImage (target->dpy, pixmap, 0, 0, pmap_width, pmap_height, AllPlanes, ZPixmap); 1442 result = XGetImage (target->dpy, pixmap, 0, 0, pmap_width, pmap_height, AllPlanes, ZPixmap);
1443 } 1443 }
1444 1444
1445 if (result) 1445 if (result)
1446 { 1446 {
1447# if !defined(HAVE_AFTERIMAGE) && !XFT 1447# if !defined(HAVE_AFTERIMAGE) && !XRENDER
1448 /* our own client-side tinting */ 1448 /* our own client-side tinting */
1449 if (!(background_flags & transpPmapTinted) && (flags & tintNeeded)) 1449 if (!(background_flags & transpPmapTinted) && (flags & tintNeeded))
1450 { 1450 {
1451 rgba c (rgba::MAX_CC,rgba::MAX_CC,rgba::MAX_CC); 1451 rgba c (rgba::MAX_CC,rgba::MAX_CC,rgba::MAX_CC);
1452 if (flags & tintSet) 1452 if (flags & tintSet)
1582 } 1582 }
1583} 1583}
1584 1584
1585#endif /* HAVE_BG_PIXMAP */ 1585#endif /* HAVE_BG_PIXMAP */
1586 1586
1587#if defined(ENABLE_TRANSPARENCY) && !defined(HAVE_AFTERIMAGE) && !XFT 1587#if defined(ENABLE_TRANSPARENCY) && !defined(HAVE_AFTERIMAGE) && !XRENDER
1588/* taken from aterm-0.4.2 */ 1588/* taken from aterm-0.4.2 */
1589 1589
1590static void 1590static void
1591ShadeXImage(Visual *visual, XImage *srcImage, int shade, int rm, int gm, int bm) 1591ShadeXImage(Visual *visual, XImage *srcImage, int shade, int rm, int gm, int bm)
1592{ 1592{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines