ImageCodecPlugin.cpp 516 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) 2021-2022, Andreas Kling <kling@serenityos.org>
  3. * Copyright (c) 2022, Dex♪ <dexes.ttp@gmail.com>
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #include <LibWeb/Platform/ImageCodecPlugin.h>
  8. namespace Web::Platform {
  9. static ImageCodecPlugin* s_the;
  10. ImageCodecPlugin::~ImageCodecPlugin() = default;
  11. ImageCodecPlugin& ImageCodecPlugin::the()
  12. {
  13. VERIFY(s_the);
  14. return *s_the;
  15. }
  16. void ImageCodecPlugin::install(ImageCodecPlugin& plugin)
  17. {
  18. VERIFY(!s_the);
  19. s_the = &plugin;
  20. }
  21. }