summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec/ccodec_pngmodule.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec/codec/ccodec_pngmodule.h')
-rw-r--r--core/fxcodec/codec/ccodec_pngmodule.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/core/fxcodec/codec/ccodec_pngmodule.h b/core/fxcodec/codec/ccodec_pngmodule.h
index 847f67e8eb..e97a221dfc 100644
--- a/core/fxcodec/codec/ccodec_pngmodule.h
+++ b/core/fxcodec/codec/ccodec_pngmodule.h
@@ -9,17 +9,13 @@
#include <memory>
+#include "core/fxcodec/codec/codec_module_iface.h"
#include "core/fxcrt/fx_system.h"
class CFX_DIBAttribute;
-class CCodec_PngModule {
+class CCodec_PngModule final : public CodecModuleIface {
public:
- class Context {
- public:
- virtual ~Context() {}
- };
-
class Delegate {
public:
virtual bool PngReadHeader(int width,
@@ -36,11 +32,13 @@ class CCodec_PngModule {
virtual void PngFillScanlineBufCompleted(int pass, int line) = 0;
};
- std::unique_ptr<Context> Start(Delegate* pDelegate);
+ // CodecModuleIface:
+ FX_FILESIZE GetAvailInput(Context* pContext) const override;
bool Input(Context* pContext,
- const uint8_t* src_buf,
- uint32_t src_size,
- CFX_DIBAttribute* pAttribute);
+ pdfium::span<uint8_t> src_buf,
+ CFX_DIBAttribute* pAttribute) override;
+
+ std::unique_ptr<Context> Start(Delegate* pDelegate);
};
#endif // CORE_FXCODEC_CODEC_CCODEC_PNGMODULE_H_