Loading image/DecoderFactory.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,9 @@ #include "nsICODecoder.h" #include "nsIconDecoder.h" #include "nsWebPDecoder.h" #ifdef MOZ_AV1 #include "nsAVIFDecoder.h" #endif namespace mozilla { Loading Loading @@ -79,10 +81,13 @@ DecoderType DecoderFactory::GetDecoderType(const char* aMimeType) { type = DecoderType::WEBP; // AVIF } else if (!strcmp(aMimeType, IMAGE_AVIF) && } #ifdef MOZ_AV1 else if (!strcmp(aMimeType, IMAGE_AVIF) && StaticPrefs::image_avif_enabled()) { type = DecoderType::AVIF; } #endif return type; } Loading Loading @@ -121,9 +126,11 @@ already_AddRefed<Decoder> DecoderFactory::GetDecoder(DecoderType aType, case DecoderType::WEBP: decoder = new nsWebPDecoder(aImage); break; #ifdef MOZ_AV1 case DecoderType::AVIF: decoder = new nsAVIFDecoder(aImage); break; #endif default: MOZ_ASSERT_UNREACHABLE("Unknown decoder type"); } Loading image/decoders/moz.build +5 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ elif toolkit == 'android': UNIFIED_SOURCES += [ 'EXIF.cpp', 'iccjpeg.c', 'nsAVIFDecoder.cpp', 'nsBMPDecoder.cpp', 'nsGIFDecoder2.cpp', 'nsICODecoder.cpp', Loading @@ -32,6 +31,11 @@ UNIFIED_SOURCES += [ 'nsWebPDecoder.cpp', ] if CONFIG['MOZ_AV1']: UNIFIED_SOURCES += [ 'nsAVIFDecoder.cpp', ] include('/ipc/chromium/chromium-config.mozbuild') LOCAL_INCLUDES += [ Loading Loading
image/DecoderFactory.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,9 @@ #include "nsICODecoder.h" #include "nsIconDecoder.h" #include "nsWebPDecoder.h" #ifdef MOZ_AV1 #include "nsAVIFDecoder.h" #endif namespace mozilla { Loading Loading @@ -79,10 +81,13 @@ DecoderType DecoderFactory::GetDecoderType(const char* aMimeType) { type = DecoderType::WEBP; // AVIF } else if (!strcmp(aMimeType, IMAGE_AVIF) && } #ifdef MOZ_AV1 else if (!strcmp(aMimeType, IMAGE_AVIF) && StaticPrefs::image_avif_enabled()) { type = DecoderType::AVIF; } #endif return type; } Loading Loading @@ -121,9 +126,11 @@ already_AddRefed<Decoder> DecoderFactory::GetDecoder(DecoderType aType, case DecoderType::WEBP: decoder = new nsWebPDecoder(aImage); break; #ifdef MOZ_AV1 case DecoderType::AVIF: decoder = new nsAVIFDecoder(aImage); break; #endif default: MOZ_ASSERT_UNREACHABLE("Unknown decoder type"); } Loading
image/decoders/moz.build +5 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ elif toolkit == 'android': UNIFIED_SOURCES += [ 'EXIF.cpp', 'iccjpeg.c', 'nsAVIFDecoder.cpp', 'nsBMPDecoder.cpp', 'nsGIFDecoder2.cpp', 'nsICODecoder.cpp', Loading @@ -32,6 +31,11 @@ UNIFIED_SOURCES += [ 'nsWebPDecoder.cpp', ] if CONFIG['MOZ_AV1']: UNIFIED_SOURCES += [ 'nsAVIFDecoder.cpp', ] include('/ipc/chromium/chromium-config.mozbuild') LOCAL_INCLUDES += [ Loading