mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Issue #1769 - Part 2: Implement JPEG-XL decoder and about:config and MIME plumbing.
Backported from Mozilla bug 1707590 whereever possible.
This commit is contained in:
parent
7983f5d8ba
commit
51ea0e4f3a
15 changed files with 257 additions and 4 deletions
|
|
@ -19,6 +19,9 @@
|
|||
#include "nsICODecoder.h"
|
||||
#include "nsIconDecoder.h"
|
||||
#include "nsWebPDecoder.h"
|
||||
#ifdef MOZ_JXL
|
||||
# include "nsJXLDecoder.h"
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
@ -77,6 +80,12 @@ DecoderFactory::GetDecoderType(const char* aMimeType)
|
|||
gfxPrefs::ImageWebPEnabled()) {
|
||||
type = DecoderType::WEBP;
|
||||
}
|
||||
#ifdef MOZ_JXL
|
||||
else if (!strcmp(aMimeType, IMAGE_JXL) &&
|
||||
gfxPrefs::ImageJXLEnabled()) {
|
||||
type = DecoderType::JXL;
|
||||
}
|
||||
#endif
|
||||
return type;
|
||||
}
|
||||
|
||||
|
|
@ -116,6 +125,11 @@ DecoderFactory::GetDecoder(DecoderType aType,
|
|||
case DecoderType::WEBP:
|
||||
decoder = new nsWebPDecoder(aImage);
|
||||
break;
|
||||
#ifdef MOZ_JXL
|
||||
case DecoderType::JXL:
|
||||
decoder = new nsJXLDecoder(aImage);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
MOZ_ASSERT_UNREACHABLE("Unknown decoder type");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue