summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlan Third <alan@idiocy.org>2019-01-02 21:00:09 +0000
committerAlan Third <alan@idiocy.org>2019-01-10 19:24:20 +0000
commita1b7a3f2a3957a399d6c3c7bcffa07ac67da82fc (patch)
tree478594bd679f2db099fcb6320750f24fcedf5fc6 /configure.ac
parentc342b26371480316024e1e5d63cd8b3f035dda69 (diff)
downloademacs-a1b7a3f2a3957a399d6c3c7bcffa07ac67da82fc.tar.gz
Add native image scaling (bug#33587)
* configure.ac: Test for XRender outside of xft checks. * src/Makefile.in (XRENDER_LIBS): List XRender libs separately from xft libs. * lisp/image.el (image--get-imagemagick-and-warn): Allow resizing if native scaling is available. * src/dispextern.h: Add XRender and image scaling stuff. (struct image): Add XRender Pictures. * src/image.c (x_create_bitmap_mask): (image_create_x_image_and_pixmap): Handle XRender Picture. (scale_image_size): (compute_image_size): Make available when any form of scaling is enabled. (x_set_image_size): New function. (lookup_image): Set image size. (x_create_x_image_and_pixmap): Create XRender Picture when necessary. (x_put_x_image): Handle the case where desired size != actual size. (free_image): Free XRender Pictures. (Fimage_scaling_p): New function. (syms_of_image): Add image-scaling-p. * src/nsimage.m (ns_load_image): Remove NS specific resizing. ([EmacsImage setSizeFromSpec:]): Remove method. (ns_image_set_size): New function. * src/nsterm.m (ns_draw_fringe_bitmap): Cocoa and GNUstep both have the same compositing functions, so remove unnecessary difference. * src/xterm.c (x_composite_image): New function. (x_draw_image_foreground): Use new x_composite_image function. * doc/lispref/display.texi (Image Descriptors): Document image-scaling-p and add resizing descriptors. (ImageMagick Images): Remove resizing descriptors.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 11 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index e5bd6943caf..16a2ce059df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3241,6 +3241,17 @@ either XPointer or XPointer*.])dnl
CFLAGS=$late_CFLAGS
fi
+# Check for XRender
+HAVE_XRENDER=no
+if test "${HAVE_X11}" = "yes"; then
+ AC_CHECK_LIB(Xrender, XRenderQueryExtension, HAVE_XRENDER=yes)
+ if test $HAVE_XRENDER = yes; then
+ XRENDER_LIBS="-lXrender"
+ AC_SUBST(XRENDER_LIBS)
+ AC_DEFINE([HAVE_XRENDER], 1, [Define to 1 if XRender is available.])
+ fi
+fi
+
### Start of font-backend (under any platform) section.
# (nothing here yet -- this is a placeholder)
### End of font-backend (under any platform) section.
@@ -3263,15 +3274,12 @@ if test "${HAVE_X11}" = "yes"; then
EMACS_CHECK_MODULES([XFT], [xft >= 0.13.0], [], [HAVE_XFT=no])
## Because xterm.c uses XRenderQueryExtension when XFT is
## enabled, we also need to link to -lXrender.
- HAVE_XRENDER=no
- AC_CHECK_LIB(Xrender, XRenderQueryExtension, HAVE_XRENDER=yes)
if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
OLD_CPPFLAGS="$CPPFLAGS"
OLD_CFLAGS="$CFLAGS"
OLD_LIBS="$LIBS"
CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
CFLAGS="$CFLAGS $XFT_CFLAGS"
- XFT_LIBS="-lXrender $XFT_LIBS"
LIBS="$XFT_LIBS $LIBS"
AC_CHECK_HEADER(X11/Xft/Xft.h,
AC_CHECK_LIB(Xft, XftFontOpen, HAVE_XFT=yes, , $XFT_LIBS) , ,