mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
cd7262ee56
This replaces the previous Web::ImageDecoding::Decoder interface. While we're doing this, also move the SerenityOS implementation of this interface from LibWebView to WebContent. That means we no longer have to link with LibImageDecoderClient in applications that use a web view.
30 lines
644 B
C++
30 lines
644 B
C++
/*
|
|
* Copyright (c) 2022, Dex♪ <dexes.ttp@gmail.com>
|
|
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/RefPtr.h>
|
|
#include <LibWeb/Platform/ImageCodecPlugin.h>
|
|
|
|
namespace ImageDecoderClient {
|
|
class Client;
|
|
}
|
|
|
|
namespace WebContent {
|
|
|
|
class ImageCodecPluginSerenity final : public Web::Platform::ImageCodecPlugin {
|
|
public:
|
|
ImageCodecPluginSerenity();
|
|
virtual ~ImageCodecPluginSerenity() override;
|
|
|
|
virtual Optional<Web::Platform::DecodedImage> decode_image(ReadonlyBytes) override;
|
|
|
|
private:
|
|
RefPtr<ImageDecoderClient::Client> m_client;
|
|
};
|
|
|
|
}
|