Files
palemoon27/image/decoders/nsWEBPDecoder.h
T
2018-07-25 06:58:52 +08:00

41 lines
967 B
C++

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef nsWEBPDecoder_h__
#define nsWEBPDecoder_h__
#include "Decoder.h"
extern "C" {
#include "webp/decode.h"
}
namespace mozilla {
namespace image {
class RasterImage;
//////////////////////////////////////////////////////////////////////
// nsWEBPDecoder Definition
class nsWEBPDecoder : public Decoder
{
public:
nsWEBPDecoder(RasterImage* aImage);
~nsWEBPDecoder() override;
void InitInternal() override;
void WriteInternal(const char* aBuffer, uint32_t aCount) override;
void FinishInternal() override;
private:
WebPIDecoder *mDecoder;
uint8_t *mData; // Pointer to WebP-decoded data.
int mPreviousLastLine; // Last image scan-line read so far.
};
} // namespace image
} // namespace mozilla
#endif // nsWEBPDecoder_h__