diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-12 15:51:53 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-13 00:55:07 +0100 |
commit | 47edd6ae894c7c303e0ea2cec00b8519ff962bc4 (patch) | |
tree | d728d06374b57864062bab3364b9a150d361ec17 /Userland/Libraries/LibGfx/JPGLoader.cpp | |
parent | 481e7b797170e5067df0c094ca7b678aed214738 (diff) | |
download | serenity-47edd6ae894c7c303e0ea2cec00b8519ff962bc4.zip |
LibGfx: Remove all load_FORMAT_from_memory() decoder wrappers
There are no more clients of these APIs, now that everyone has been made
to use ImageDecoderPlugin objects instead.
Diffstat (limited to 'Userland/Libraries/LibGfx/JPGLoader.cpp')
-rw-r--r-- | Userland/Libraries/LibGfx/JPGLoader.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/Userland/Libraries/LibGfx/JPGLoader.cpp b/Userland/Libraries/LibGfx/JPGLoader.cpp index 914e8deaa8..0c2559e279 100644 --- a/Userland/Libraries/LibGfx/JPGLoader.cpp +++ b/Userland/Libraries/LibGfx/JPGLoader.cpp @@ -4,15 +4,11 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include <AK/Bitmap.h> -#include <AK/ByteBuffer.h> #include <AK/Debug.h> #include <AK/HashMap.h> #include <AK/Math.h> #include <AK/MemoryStream.h> -#include <AK/String.h> #include <AK/Vector.h> -#include <LibGfx/Bitmap.h> #include <LibGfx/JPGLoader.h> #define JPG_INVALID 0X0000 @@ -1222,26 +1218,6 @@ static bool decode_jpg(JPGLoadingContext& context) return true; } -static RefPtr<Gfx::Bitmap> load_jpg_impl(const u8* data, size_t data_size) -{ - JPGLoadingContext context; - context.data = data; - context.data_size = data_size; - - if (!decode_jpg(context)) - return nullptr; - - return context.bitmap; -} - -RefPtr<Gfx::Bitmap> load_jpg_from_memory(u8 const* data, size_t length, String const& mmap_name) -{ - auto bitmap = load_jpg_impl(data, length); - if (bitmap) - bitmap->set_mmap_name(String::formatted("Gfx::Bitmap [{}] - Decoded jpg: {}", bitmap->size(), mmap_name)); - return bitmap; -} - JPGImageDecoderPlugin::JPGImageDecoderPlugin(const u8* data, size_t size) { m_context = make<JPGLoadingContext>(); |