/* * Copyright (c) 2021, Andreas Kling * Copyright (c) 2022, Dex♪ * * SPDX-License-Identifier: BSD-2-Clause */ #include namespace Web::ImageDecoding { static RefPtr s_decoder; Decoder::Decoder() = default; Decoder::~Decoder() = default; void Decoder::initialize(RefPtr&& decoder) { s_decoder = move(decoder); } Decoder& Decoder::the() { if (!s_decoder) [[unlikely]] { dbgln("Web::ImageDecoding::Decoder was not initialized!"); VERIFY_NOT_REACHED(); } return *s_decoder; } }