diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-27 23:45:52 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-27 23:45:52 +0000 |
commit | f2615a38d963c35c4e11def602ab2cbea266b708 (patch) | |
tree | e0cda9f51ab8bca42ed382f1a9600c0fba7115c6 /core/fxcodec/codec/ccodec_progressivedecoder.h | |
parent | 991f5b7b5eb88844a66b488b86b0c5a0883f2e11 (diff) | |
download | pdfium-f2615a38d963c35c4e11def602ab2cbea266b708.tar.xz |
Rework CCODEC_ProgressiveDecoder.
Rename .cpp file to match class and .h file (!!!)
Put initialziations into header.
Change-Id: I2cbc7608287f8df887ce186d122dcd3db2aef19b
Reviewed-on: https://pdfium-review.googlesource.com/41511
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/ccodec_progressivedecoder.h')
-rw-r--r-- | core/fxcodec/codec/ccodec_progressivedecoder.h | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/core/fxcodec/codec/ccodec_progressivedecoder.h b/core/fxcodec/codec/ccodec_progressivedecoder.h index 979de6ed25..b5890e9d9c 100644 --- a/core/fxcodec/codec/ccodec_progressivedecoder.h +++ b/core/fxcodec/codec/ccodec_progressivedecoder.h @@ -73,7 +73,7 @@ class CCodec_ProgressiveDecoder : CFX_DIBAttribute* pAttribute, bool bSkipImageTypeCheck); - FXCODEC_IMAGE_TYPE GetType() const { return m_imagType; } + FXCODEC_IMAGE_TYPE GetType() const { return m_imageType; } int32_t GetWidth() const { return m_SrcWidth; } int32_t GetHeight() const { return m_SrcHeight; } int32_t GetNumComponents() const { return m_SrcComponents; } @@ -241,6 +241,8 @@ class CCodec_ProgressiveDecoder : double scale_y, int dest_row); + FXCODEC_STATUS m_status = FXCODEC_STATUS_DECODE_FINISH; + FXCODEC_IMAGE_TYPE m_imageType = FXCODEC_IMAGE_UNKNOWN; RetainPtr<IFX_SeekableReadStream> m_pFile; RetainPtr<CFX_DIBitmap> m_pDeviceBitmap; UnownedPtr<CCodec_ModuleMgr> m_pCodecMgr; @@ -257,44 +259,42 @@ class CCodec_ProgressiveDecoder : #ifdef PDF_ENABLE_XFA_TIFF std::unique_ptr<CCodec_TiffModule::Context> m_pTiffContext; #endif // PDF_ENABLE_XFA_TIFF - FXCODEC_IMAGE_TYPE m_imagType; - uint32_t m_offSet; - uint8_t* m_pSrcBuf; - uint32_t m_SrcSize; - uint8_t* m_pDecodeBuf; - int m_ScanlineSize; + uint32_t m_offSet = 0; + uint8_t* m_pSrcBuf = nullptr; + uint32_t m_SrcSize = 0; + uint8_t* m_pDecodeBuf = nullptr; + int m_ScanlineSize = 0; CFXCODEC_WeightTable m_WeightHorz; CFXCODEC_VertTable m_WeightVert; CFXCODEC_HorzTable m_WeightHorzOO; - int m_SrcWidth; - int m_SrcHeight; - int m_SrcComponents; - int m_SrcBPC; + int m_SrcWidth = 0; + int m_SrcHeight = 0; + int m_SrcComponents = 0; + int m_SrcBPC = 0; FX_RECT m_clipBox; - int m_startX; - int m_startY; - int m_sizeX; - int m_sizeY; - int m_TransMethod; - FX_ARGB* m_pSrcPalette; - int m_SrcPaletteNumber; - int m_SrcRow; - FXCodec_Format m_SrcFormat; - int m_SrcPassNumber; - size_t m_FrameNumber; - size_t m_FrameCur; + int m_startX = 0; + int m_startY = 0; + int m_sizeX = 0; + int m_sizeY = 0; + int m_TransMethod = -1; + FX_ARGB* m_pSrcPalette = nullptr; + int m_SrcPaletteNumber = 0; + int m_SrcRow = 0; + FXCodec_Format m_SrcFormat = FXCodec_Invalid; + int m_SrcPassNumber = 0; + size_t m_FrameNumber = 0; + size_t m_FrameCur = 0; #ifdef PDF_ENABLE_XFA_GIF - int m_GifBgIndex; - CFX_GifPalette* m_pGifPalette; - int32_t m_GifPltNumber; - int m_GifTransIndex; + int m_GifBgIndex = 0; + CFX_GifPalette* m_pGifPalette = nullptr; + int32_t m_GifPltNumber = 0; + int m_GifTransIndex = -1; FX_RECT m_GifFrameRect; - bool m_InvalidateGifBuffer; + bool m_InvalidateGifBuffer = true; #endif // PDF_ENABLE_XFA_GIF #ifdef PDF_ENABLE_XFA_BMP - bool m_BmpIsTopBottom; + bool m_BmpIsTopBottom = false; #endif // PDF_ENABLE_XFA_BMP - FXCODEC_STATUS m_status; }; #endif // CORE_FXCODEC_CODEC_CCODEC_PROGRESSIVEDECODER_H_ |