Files
palemoon27/image/decoders/nsWEBPDecoder.h
T
wolfbeast 915a8f37a7 Use new type frame allocation.
Remove decoder-internal mImageData (let Decoder handle that!)
Decoding works now, but data transfer from mData to mImageData is still wrong.
2018-07-25 00:55:31 +08:00

45 lines
1016 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"
#include "nsCOMPtr.h"
extern "C" {
#include "webp/decode.h"
}
namespace mozilla {
namespace image {
class RasterImage;
//////////////////////////////////////////////////////////////////////
// nsWEBPDecoder Definition
class nsWEBPDecoder : public Decoder
{
public:
nsWEBPDecoder(RasterImage* aImage);
virtual ~nsWEBPDecoder();
virtual void InitInternal();
virtual void WriteInternal(const char* aBuffer, uint32_t aCount);
virtual void FinishInternal();
public:
WebPDecBuffer mDecBuf;
WebPIDecoder *mDecoder;
uint8_t *mData; // Pointer to WebP-decoded data.
int mLastLine; // Last image scan-line read so far.
};
} // namespace image
} // namespace mozilla
#endif // nsWEBPDecoder_h__