mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-06-06 00:19:08 +00:00
915a8f37a7
Remove decoder-internal mImageData (let Decoder handle that!) Decoding works now, but data transfer from mData to mImageData is still wrong.
45 lines
1016 B
C++
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__
|
|
|