2022-09-16 10:01:47 -03:00
|
|
|
/*
|
2024-10-04 08:19:50 -03:00
|
|
|
* Copyright (c) 2021-2022, Andreas Kling <andreas@ladybird.org>
|
2022-09-16 10:01:47 -03:00
|
|
|
* Copyright (c) 2022, Dex♪ <dexes.ttp@gmail.com>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <LibWeb/Platform/ImageCodecPlugin.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::Platform {
|
|
|
|
|
|
|
|
|
|
static ImageCodecPlugin* s_the;
|
|
|
|
|
|
|
|
|
|
ImageCodecPlugin::~ImageCodecPlugin() = default;
|
|
|
|
|
|
|
|
|
|
ImageCodecPlugin& ImageCodecPlugin::the()
|
|
|
|
|
{
|
|
|
|
|
VERIFY(s_the);
|
|
|
|
|
return *s_the;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-12 10:17:05 -03:00
|
|
|
bool ImageCodecPlugin::is_initialized()
|
|
|
|
|
{
|
|
|
|
|
return s_the != nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
2022-09-16 10:01:47 -03:00
|
|
|
void ImageCodecPlugin::install(ImageCodecPlugin& plugin)
|
|
|
|
|
{
|
|
|
|
|
VERIFY(!s_the);
|
|
|
|
|
s_the = &plugin;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|