summaryrefslogtreecommitdiff
path: root/Userland/Services/WebContent/ImageCodecPluginSerenity.h
blob: 42d967b0f1b013ae14751b7721b002602da11d75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * 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;
};

}