Use native image APIs on MS-Windows by default

* src/w32term.c (syms_of_w32term) <w32-use-native-image-API>: Now
t by default on W2K and later systems, but only on WINDOWSNT
builds.

* etc/NEWS: Announce the change.
This commit is contained in:
Eli Zaretskii 2022-03-26 11:52:41 +03:00
parent a6abb6f5cd
commit 4525b49118
2 changed files with 17 additions and 3 deletions

View file

@ -1821,6 +1821,19 @@ follow the system's dark mode: GUI frames use the appropriate light or
dark title bar and scroll bars, based on the user's Windows-wide color
settings.
---
*** Emacs now uses native image APIs to display some image formats.
On Windows 2000 and later, Emacs now defaults to using the native
image APIs for displaying the BMP, GIF, JPEG, PNG, and TIFF images.
This means Emacs on MS-Windows needs no longer use external image
support libraries to display those images. Other image types -- XPM,
SVG, and WEBP -- still need support libraries for Emacs to be able to
display them.
The use of native image APIs is controlled by the variable
'w32-use-native-image-API', whose value now defaults to t on systems
where those APIs are available.
+++
*** Emacs now supports display of BMP images using native image APIs.
When 'w32-use-native-image-API' is non-nil, Emacs on MS-Windows now

View file

@ -7744,9 +7744,10 @@ The native image API library used is GDI+ via GDIPLUS.DLL. This
library is available only since W2K, therefore this variable is
unconditionally set to nil on older systems. */);
/* For now, disabled by default, since this is an experimental feature. */
#if 0 && HAVE_NATIVE_IMAGE_API
if (os_subtype == OS_9X)
/* Disabled for Cygwin/w32 builds, since they don't link against
-lgdiplus, see configure.ac. */
#if defined WINDOWSNT && HAVE_NATIVE_IMAGE_API
if (os_subtype == OS_SUBTYPE_9X)
w32_use_native_image_api = 0;
else
w32_use_native_image_api = 1;