forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ImageCodecPlugin.h
26 lines (19 loc) · 722 Bytes
/
ImageCodecPlugin.h
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
/*
* Copyright (c) 2022, Dex♪ <[email protected]>
* Copyright (c) 2022, Andreas Kling <[email protected]>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibImageDecoderClient/Client.h>
#include <LibWeb/Platform/ImageCodecPlugin.h>
namespace Ladybird {
class ImageCodecPlugin final : public Web::Platform::ImageCodecPlugin {
public:
ImageCodecPlugin() = default;
virtual ~ImageCodecPlugin() override;
virtual NonnullRefPtr<Core::Promise<Web::Platform::DecodedImage>> decode_image(ReadonlyBytes, Function<ErrorOr<void>(Web::Platform::DecodedImage&)> on_resolved, Function<void(Error&)> on_rejected) override;
private:
RefPtr<ImageDecoderClient::Client> m_client;
};
}