mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-06-06 08:29:08 +00:00
41 lines
967 B
C++
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__
|