emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4525b49118: Use native image APIs on MS-Windows by default


From: Eli Zaretskii
Subject: master 4525b49118: Use native image APIs on MS-Windows by default
Date: Sat, 26 Mar 2022 04:53:52 -0400 (EDT)

branch: master
commit 4525b4911834a95850e70c48de4c71de44af53de
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    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.
---
 etc/NEWS      | 13 +++++++++++++
 src/w32term.c |  7 ++++---
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index f726b0a2e8..b6ae8bb9cf 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -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
diff --git a/src/w32term.c b/src/w32term.c
index 9094843f60..7837032304 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]