mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-19 02:10:26 +00:00
Instead of passing RequestServer and ImageDecoder socket FDs as command-line arguments to WebContent, send them over the main IPC channel after launch. This unifies initial connection and reconnection into a single code path.
33 lines
590 B
C++
33 lines
590 B
C++
/*
|
|
* Copyright (c) 2021-2022, Andreas Kling <andreas@ladybird.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;
|
|
}
|
|
|
|
bool ImageCodecPlugin::is_initialized()
|
|
{
|
|
return s_the != nullptr;
|
|
}
|
|
|
|
void ImageCodecPlugin::install(ImageCodecPlugin& plugin)
|
|
{
|
|
VERIFY(!s_the);
|
|
s_the = &plugin;
|
|
}
|
|
|
|
}
|