/* * Copyright (c) 2021, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include namespace Web { ImageDecoderClient::Client& image_decoder_client() { static RefPtr image_decoder_client; if (!image_decoder_client) { image_decoder_client = ImageDecoderClient::Client::try_create().release_value_but_fixme_should_propagate_errors(); image_decoder_client->on_death = [&] { image_decoder_client = nullptr; }; } return *image_decoder_client; } }