mirror of
https://github.com/zen-browser/desktop.git
synced 2026-03-05 16:27:04 +00:00
Based on this following phabricator patch/commits: - https://phabricator.services.mozilla.com/D119700 - https://phabricator.services.mozilla.com/D122158 - https://phabricator.services.mozilla.com/D122159 Which add the following: - Proper color profiles support for JPEG XL - Animated JPEG XL - Progressive decoding Co-authored-by: wwwwwwww <wvvwvvvvwvvw@gmail.com>
33 lines
1.3 KiB
C++
33 lines
1.3 KiB
C++
diff --git a/image/DecoderFactory.cpp b/image/DecoderFactory.cpp
|
|
index f36f03c7f2..d2cdd79f70 100644
|
|
--- a/image/DecoderFactory.cpp
|
|
+++ b/image/DecoderFactory.cpp
|
|
@@ -244,7 +244,12 @@ nsresult DecoderFactory::CreateAnimationDecoder(
|
|
}
|
|
|
|
MOZ_ASSERT(aType == DecoderType::GIF || aType == DecoderType::PNG ||
|
|
- aType == DecoderType::WEBP || aType == DecoderType::AVIF,
|
|
+ aType == DecoderType::WEBP || aType == DecoderType::AVIF
|
|
+#ifdef MOZ_JXL
|
|
+ || aType == DecoderType::JXL,
|
|
+#else
|
|
+ ,
|
|
+#endif
|
|
"Calling CreateAnimationDecoder for non-animating DecoderType");
|
|
|
|
// Create an anonymous decoder. Interaction with the SurfaceCache and the
|
|
@@ -299,7 +304,12 @@ already_AddRefed<Decoder> DecoderFactory::CloneAnimationDecoder(
|
|
// rediscover it is animated).
|
|
DecoderType type = aDecoder->GetType();
|
|
MOZ_ASSERT(type == DecoderType::GIF || type == DecoderType::PNG ||
|
|
- type == DecoderType::WEBP || type == DecoderType::AVIF,
|
|
+ type == DecoderType::WEBP || type == DecoderType::AVIF
|
|
+#ifdef MOZ_JXL
|
|
+ || aType == DecoderType::JXL,
|
|
+#else
|
|
+ ,
|
|
+#endif
|
|
"Calling CloneAnimationDecoder for non-animating DecoderType");
|
|
|
|
RefPtr<Decoder> decoder = GetDecoder(type, nullptr, /* aIsRedecode = */ true);
|