From: Po Lu Date: Tue, 12 Apr 2022 02:37:39 +0000 (+0000) Subject: Don't use native image APIs for some types on Haiku X-Git-Tag: emacs-29.0.90~1931^2~645 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bf44581a5e6a8232b222261a607e5bee148c195b;p=emacs.git Don't use native image APIs for some types on Haiku * src/haikuimage.c (haiku_can_use_native_image_api): Ignore types with animations when their respective libraries are present. --- diff --git a/src/haikuimage.c b/src/haikuimage.c index 1207fb32d36..af3021c5cd9 100644 --- a/src/haikuimage.c +++ b/src/haikuimage.c @@ -42,8 +42,10 @@ haiku_can_use_native_image_api (Lisp_Object type) mime_type = "image/jpeg"; else if (EQ (type, Qpng)) mime_type = "image/png"; +#ifndef HAVE_GIF else if (EQ (type, Qgif)) mime_type = "image/gif"; +#endif else if (EQ (type, Qtiff)) mime_type = "image/tiff"; else if (EQ (type, Qbmp)) @@ -52,8 +54,12 @@ haiku_can_use_native_image_api (Lisp_Object type) mime_type = "image/svg"; else if (EQ (type, Qpbm)) mime_type = "image/pbm"; + /* Don't use native image APIs for image types that have animations, + since those aren't supported by the Translation Kit. */ +#ifndef HAVE_WEBP else if (EQ (type, Qwebp)) mime_type = "image/webp"; +#endif if (!mime_type) return 0;