diff options
| author | Po Lu | 2022-04-12 02:37:39 +0000 |
|---|---|---|
| committer | Po Lu | 2022-04-12 02:37:39 +0000 |
| commit | bf44581a5e6a8232b222261a607e5bee148c195b (patch) | |
| tree | b709cdf1ac1db296444930a94a0ba9177f3d2501 /src | |
| parent | 1ef57361ab784fb15fbc6a8e14600de395fe6b75 (diff) | |
| download | emacs-bf44581a5e6a8232b222261a607e5bee148c195b.tar.gz emacs-bf44581a5e6a8232b222261a607e5bee148c195b.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/haikuimage.c | 6 |
1 files changed, 6 insertions, 0 deletions
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) | |||
| 42 | mime_type = "image/jpeg"; | 42 | mime_type = "image/jpeg"; |
| 43 | else if (EQ (type, Qpng)) | 43 | else if (EQ (type, Qpng)) |
| 44 | mime_type = "image/png"; | 44 | mime_type = "image/png"; |
| 45 | #ifndef HAVE_GIF | ||
| 45 | else if (EQ (type, Qgif)) | 46 | else if (EQ (type, Qgif)) |
| 46 | mime_type = "image/gif"; | 47 | mime_type = "image/gif"; |
| 48 | #endif | ||
| 47 | else if (EQ (type, Qtiff)) | 49 | else if (EQ (type, Qtiff)) |
| 48 | mime_type = "image/tiff"; | 50 | mime_type = "image/tiff"; |
| 49 | else if (EQ (type, Qbmp)) | 51 | else if (EQ (type, Qbmp)) |
| @@ -52,8 +54,12 @@ haiku_can_use_native_image_api (Lisp_Object type) | |||
| 52 | mime_type = "image/svg"; | 54 | mime_type = "image/svg"; |
| 53 | else if (EQ (type, Qpbm)) | 55 | else if (EQ (type, Qpbm)) |
| 54 | mime_type = "image/pbm"; | 56 | mime_type = "image/pbm"; |
| 57 | /* Don't use native image APIs for image types that have animations, | ||
| 58 | since those aren't supported by the Translation Kit. */ | ||
| 59 | #ifndef HAVE_WEBP | ||
| 55 | else if (EQ (type, Qwebp)) | 60 | else if (EQ (type, Qwebp)) |
| 56 | mime_type = "image/webp"; | 61 | mime_type = "image/webp"; |
| 62 | #endif | ||
| 57 | 63 | ||
| 58 | if (!mime_type) | 64 | if (!mime_type) |
| 59 | return 0; | 65 | return 0; |