diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-03-28 09:31:32 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-28 16:42:55 +0000 |
commit | f0799fe84df4d86f25d342b03525f3016d674f86 (patch) | |
tree | d6839802a68b7b6ad6fb166179ede779c3560c75 /core/fxcodec/codec/ccodec_progressivedecoder.h | |
parent | 31b08d4cdaa17d7a03f35e087096a77036af98ec (diff) | |
download | pdfium-f0799fe84df4d86f25d342b03525f3016d674f86.tar.xz |
Revert "Revert "Refcount all CFX_DIBSources (and subclasses) all the time.""
This reverts commit 31b08d4cdaa17d7a03f35e087096a77036af98ec.
Re-landing the patch after fixing skia build issue.
Change-Id: Ie7039890088b803a6ec5ce365d70f57277459b48
Reviewed-on: https://pdfium-review.googlesource.com/3245
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/ccodec_progressivedecoder.h')
-rw-r--r-- | core/fxcodec/codec/ccodec_progressivedecoder.h | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/core/fxcodec/codec/ccodec_progressivedecoder.h b/core/fxcodec/codec/ccodec_progressivedecoder.h index 61703dde29..cd96ee76a0 100644 --- a/core/fxcodec/codec/ccodec_progressivedecoder.h +++ b/core/fxcodec/codec/ccodec_progressivedecoder.h @@ -58,7 +58,7 @@ class CCodec_ProgressiveDecoder : public ICodec_BmpModule::Delegate, void SetClipBox(FX_RECT* clip); FXCODEC_STATUS GetFrames(int32_t& frames, IFX_Pause* pPause = nullptr); - FXCODEC_STATUS StartDecode(CFX_DIBitmap* pDIBitmap, + FXCODEC_STATUS StartDecode(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap, int start_x, int start_y, int size_x, @@ -138,7 +138,7 @@ class CCodec_ProgressiveDecoder : public ICodec_BmpModule::Delegate, uint32_t m_SrcSize; uint8_t* m_pDecodeBuf; int m_ScanlineSize; - CFX_DIBitmap* m_pDeviceBitmap; + CFX_RetainPtr<CFX_DIBitmap> m_pDeviceBitmap; bool m_bInterpol; CFXCODEC_WeightTable m_WeightHorz; CFXCODEC_VertTable m_WeightVert; @@ -201,29 +201,35 @@ class CCodec_ProgressiveDecoder : public ICodec_BmpModule::Delegate, FXCODEC_STATUS& err_status); bool GifReadMoreData(ICodec_GifModule* pGifModule, FXCODEC_STATUS& err_status); - void GifDoubleLineResampleVert(CFX_DIBitmap* pDeviceBitmap, - double scale_y, - int des_row); - void PngOneOneMapResampleHorz(CFX_DIBitmap* pDeviceBitmap, - int32_t des_line, - uint8_t* src_scan, - FXCodec_Format src_format); + void GifDoubleLineResampleVert( + const CFX_RetainPtr<CFX_DIBitmap>& pDeviceBitmap, + double scale_y, + int des_row); + void PngOneOneMapResampleHorz( + const CFX_RetainPtr<CFX_DIBitmap>& pDeviceBitmap, + int32_t des_line, + uint8_t* src_scan, + FXCodec_Format src_format); bool DetectImageType(FXCODEC_IMAGE_TYPE imageType, CFX_DIBAttribute* pAttribute); void GetDownScale(int& down_scale); void GetTransMethod(FXDIB_Format des_format, FXCodec_Format src_format); - void ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, + void ReSampleScanline(const CFX_RetainPtr<CFX_DIBitmap>& pDeviceBitmap, int32_t des_line, uint8_t* src_scan, FXCodec_Format src_format); - void Resample(CFX_DIBitmap* pDeviceBitmap, + void Resample(const CFX_RetainPtr<CFX_DIBitmap>& pDeviceBitmap, int32_t src_line, uint8_t* src_scan, FXCodec_Format src_format); - void ResampleVert(CFX_DIBitmap* pDeviceBitmap, double scale_y, int des_row); + void ResampleVert(const CFX_RetainPtr<CFX_DIBitmap>& pDeviceBitmap, + double scale_y, + int des_row); bool JpegReadMoreData(CCodec_JpegModule* pJpegModule, FXCODEC_STATUS& err_status); - void ResampleVertBT(CFX_DIBitmap* pDeviceBitmap, double scale_y, int des_row); + void ResampleVertBT(const CFX_RetainPtr<CFX_DIBitmap>& pDeviceBitmap, + double scale_y, + int des_row); }; #endif // CORE_FXCODEC_CODEC_CCODEC_PROGRESSIVEDECODER_H_ |