ladybird/Userland/Libraries/LibWeb/Platform/ImageCodecPlugin.cpp
Andrew Kaster 651e78fedb LibWeb: Convert callers of ImageCodecPlugin to the async API
The HTMLLinkElement caller is a bit hairy, so we shove an await() in
there temporarily. This is sure to cause fun times for anyone debugging
task/microtask execution order.
2024-04-23 12:32:04 -06:00

29 lines
516 B
C++

/*
* Copyright (c) 2021-2022, Andreas Kling <kling@serenityos.org>
* 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;
}
void ImageCodecPlugin::install(ImageCodecPlugin& plugin)
{
VERIFY(!s_the);
s_the = &plugin;
}
}