From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juan =?utf-8?Q?Jos=C3=A9_Garc=C3=ADa-Ripoll?= Newsgroups: gmane.emacs.devel Subject: Re: GDI+ take 3 Date: Sun, 19 Apr 2020 22:28:24 +0200 Message-ID: <86368zxlsn.fsf@csic.es> References: <83d088fwgt.fsf@gnu.org> <835ze0fqk2.fsf@gnu.org> <83sgh3eogs.fsf@gnu.org> <838sitazal.fsf@gnu.org> <86imhxufx9.fsf@csic.es> <83y2qsap7r.fsf@gnu.org> <20200418201943.GA57763@breton.holly.idiocy.org> <83eesjibo6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="45590"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) To: emacs-devel@gnu.org Cancel-Lock: sha1:tvUrSL+twU9Q50kS8VZKAEaDnY4= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 19 22:29:01 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jQGYn-000BkH-ID for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Apr 2020 22:29:01 +0200 Original-Received: from localhost ([::1]:47416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQGYm-0000wj-72 for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Apr 2020 16:29:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36668 helo=eggs1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQGYK-0000Xv-3c for emacs-devel@gnu.org; Sun, 19 Apr 2020 16:28:32 -0400 Original-Received: from Debian-exim by eggs1p.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jQGYJ-0003Ev-OG for emacs-devel@gnu.org; Sun, 19 Apr 2020 16:28:31 -0400 Original-Received: from ciao.gmane.io ([159.69.161.202]:58780) by eggs1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jQGYJ-0003Dn-BF for emacs-devel@gnu.org; Sun, 19 Apr 2020 16:28:31 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1jQGYH-000B7L-7d for emacs-devel@gnu.org; Sun, 19 Apr 2020 22:28:29 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=159.69.161.202; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-detected-operating-system: by eggs1p.gnu.org: Linux 3.11 and newer [fuzzy] X-Received-From: 159.69.161.202 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:247328 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Eli Zaretskii writes: > I pushed the changes to load GDI+ functions correctly. Now everything > works for me like Juanma reported, including multi-page GIF and TIFF > images. Please test again that I didn't break anything in the 64-bit > builds. Two minor changes attached. First, the introduction of the Qnative_image type makes one call to image_can_use_native_api irrelevant. Regarding this, I think it is a bad idea to introduce Qnative_image, because that is not an image format and users cannot recognize the actual image type from the image descriptor. The second fix makes w32image.c behave like nsimage.c, in that a delay=0 is regarded as non-existant, thus returning nil. This makes animations default to the minimum animation delay, which currently is 0.01, and more useful than a delay of 0. -- Juan José García Ripoll http://juanjose.garciaripoll.com http://quinfog.hbar.es --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=patch.diff diff --git a/src/image.c b/src/image.c index ffe2f607e5..c5835a0623 100644 --- a/src/image.c +++ b/src/image.c @@ -10182,11 +10182,6 @@ initialize_image_type (struct image_type const *type) #ifdef WINDOWSNT Lisp_Object typesym = builtin_lisp_symbol (type->type); -# if HAVE_NATIVE_IMAGE_API - if (image_can_use_native_api (typesym)) - return true; -# endif - Lisp_Object tested = Fassq (typesym, Vlibrary_cache); /* If we failed to load the library before, don't try again. */ if (CONSP (tested)) diff --git a/src/w32image.c b/src/w32image.c index 085a5db3ab..11d96a123e 100644 --- a/src/w32image.c +++ b/src/w32image.c @@ -444,7 +444,8 @@ w32_load_image (struct frame *f, struct image *img, { if (nframes > 1) metadata = Fcons (Qcount, Fcons (make_fixnum (nframes), metadata)); - if (delay >= 0) + /* We follow nsimage.c: if the delay is zero, return nil. */ + if (delay > 0) metadata = Fcons (Qdelay, Fcons (make_float (delay), metadata)); } else if (status == Win32Error) /* FIXME! */ --=-=-=--