mirror of
https://github.com/zen-browser/desktop.git
synced 2026-03-06 00:37:03 +00:00
Implement a more complete JXL features
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>
This commit is contained in:
32
src/image/DecoderFactory-cpp.patch
Normal file
32
src/image/DecoderFactory-cpp.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
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);
|
||||
Reference in New Issue
Block a user