diff options
Diffstat (limited to 'core/fxcodec/codec/ccodec_pngmodule.h')
-rw-r--r-- | core/fxcodec/codec/ccodec_pngmodule.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/core/fxcodec/codec/ccodec_pngmodule.h b/core/fxcodec/codec/ccodec_pngmodule.h index 2b43f5d8bc..b92e09cc71 100644 --- a/core/fxcodec/codec/ccodec_pngmodule.h +++ b/core/fxcodec/codec/ccodec_pngmodule.h @@ -11,12 +11,10 @@ #include "core/fxcrt/fx_system.h" class CFX_DIBAttribute; -struct FXPNG_Context; - -#define PNG_ERROR_SIZE 256 class CCodec_PngModule { public: + class Context; class Delegate { public: virtual bool PngReadHeader(int width, @@ -29,22 +27,12 @@ class CCodec_PngModule { virtual void PngFillScanlineBufCompleted(int pass, int line) = 0; }; - CCodec_PngModule(); - ~CCodec_PngModule(); - - FXPNG_Context* Start(); - void Finish(FXPNG_Context* pContext); - bool Input(FXPNG_Context* pContext, + Context* Start(Delegate* pDelegate); + void Finish(Context* pContext); + bool Input(Context* pContext, const uint8_t* src_buf, uint32_t src_size, CFX_DIBAttribute* pAttribute); - - Delegate* GetDelegate() const { return m_pDelegate.Get(); } - void SetDelegate(Delegate* delegate) { m_pDelegate = delegate; } - - protected: - CFX_UnownedPtr<Delegate> m_pDelegate; - char m_szLastError[PNG_ERROR_SIZE]; }; #endif // CORE_FXCODEC_CODEC_CCODEC_PNGMODULE_H_ |