blob: 706c04c97ad9848949b1943debfddeaf6a56f2ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/ImageDecoding.h>
namespace Web {
ImageDecoderClient::Client& image_decoder_client()
{
static RefPtr<ImageDecoderClient::Client> image_decoder_client;
if (!image_decoder_client) {
image_decoder_client = ImageDecoderClient::Client::construct();
image_decoder_client->on_death = [&] {
image_decoder_client = nullptr;
};
}
return *image_decoder_client;
}
}
|