diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-09-21 15:49:49 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-21 20:17:31 +0000 |
commit | 0b95042db2e6dab5876abd12ce485fff0a8e08fe (patch) | |
tree | 02132ed53945fde30bfbf230ff4e9b5308dd7732 /core/fxcodec | |
parent | a5eb9f05b7c3f82630784e043ccf75c4e019b18f (diff) | |
download | pdfium-0b95042db2e6dab5876abd12ce485fff0a8e08fe.tar.xz |
Rename CFX_RetainPtr to RetainPtr
This CL renames CFX_RetainPtr to RetainPtr and places in the fxcrt
namespace.
Bug: pdfium:898
Change-Id: I8798a9f79cb0840d3f037e8d04937cedd742914e
Reviewed-on: https://pdfium-review.googlesource.com/14616
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcodec')
-rw-r--r-- | core/fxcodec/codec/ccodec_jbig2module.h | 10 | ||||
-rw-r--r-- | core/fxcodec/codec/ccodec_jpegmodule.h | 4 | ||||
-rw-r--r-- | core/fxcodec/codec/ccodec_progressivedecoder.h | 41 | ||||
-rw-r--r-- | core/fxcodec/codec/ccodec_tiffmodule.cpp | 39 | ||||
-rw-r--r-- | core/fxcodec/codec/ccodec_tiffmodule.h | 6 | ||||
-rw-r--r-- | core/fxcodec/codec/fx_codec_jbig.cpp | 4 | ||||
-rw-r--r-- | core/fxcodec/codec/fx_codec_jpeg.cpp | 2 | ||||
-rw-r--r-- | core/fxcodec/codec/fx_codec_progress.cpp | 32 | ||||
-rw-r--r-- | core/fxcodec/jbig2/JBig2_BitStream.cpp | 3 | ||||
-rw-r--r-- | core/fxcodec/jbig2/JBig2_BitStream.h | 4 | ||||
-rw-r--r-- | core/fxcodec/jbig2/JBig2_Context.cpp | 9 | ||||
-rw-r--r-- | core/fxcodec/jbig2/JBig2_Context.h | 4 |
12 files changed, 76 insertions, 82 deletions
diff --git a/core/fxcodec/codec/ccodec_jbig2module.h b/core/fxcodec/codec/ccodec_jbig2module.h index 6b36f19a6d..4fa4a81776 100644 --- a/core/fxcodec/codec/ccodec_jbig2module.h +++ b/core/fxcodec/codec/ccodec_jbig2module.h @@ -10,7 +10,7 @@ #include <memory> #include "core/fxcodec/fx_codec_def.h" -#include "core/fxcrt/cfx_retain_ptr.h" +#include "core/fxcrt/retain_ptr.h" class CJBig2_Context; class CJBig2_Image; @@ -25,8 +25,8 @@ class CCodec_Jbig2Context { uint32_t m_width; uint32_t m_height; - CFX_RetainPtr<CPDF_StreamAcc> m_pGlobalStream; - CFX_RetainPtr<CPDF_StreamAcc> m_pSrcStream; + RetainPtr<CPDF_StreamAcc> m_pGlobalStream; + RetainPtr<CPDF_StreamAcc> m_pSrcStream; uint8_t* m_dest_buf; uint32_t m_dest_pitch; std::unique_ptr<CJBig2_Context> m_pContext; @@ -42,8 +42,8 @@ class CCodec_Jbig2Module { std::unique_ptr<JBig2_DocumentContext>* pContextHolder, uint32_t width, uint32_t height, - const CFX_RetainPtr<CPDF_StreamAcc>& src_stream, - const CFX_RetainPtr<CPDF_StreamAcc>& global_stream, + const RetainPtr<CPDF_StreamAcc>& src_stream, + const RetainPtr<CPDF_StreamAcc>& global_stream, uint8_t* dest_buf, uint32_t dest_pitch, IFX_PauseIndicator* pPause); diff --git a/core/fxcodec/codec/ccodec_jpegmodule.h b/core/fxcodec/codec/ccodec_jpegmodule.h index a5837177f2..d7e484d56f 100644 --- a/core/fxcodec/codec/ccodec_jpegmodule.h +++ b/core/fxcodec/codec/ccodec_jpegmodule.h @@ -9,8 +9,8 @@ #include <memory> -#include "core/fxcrt/cfx_retain_ptr.h" #include "core/fxcrt/fx_system.h" +#include "core/fxcrt/retain_ptr.h" class CCodec_ScanlineDecoder; class CFX_DIBSource; @@ -58,7 +58,7 @@ class CCodec_JpegModule { uint32_t GetAvailInput(Context* pContext, uint8_t** avail_buf_ptr); #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ - static bool JpegEncode(const CFX_RetainPtr<CFX_DIBSource>& pSource, + static bool JpegEncode(const RetainPtr<CFX_DIBSource>& pSource, uint8_t** dest_buf, FX_STRSIZE* dest_size); #endif diff --git a/core/fxcodec/codec/ccodec_progressivedecoder.h b/core/fxcodec/codec/ccodec_progressivedecoder.h index 4417e47824..3ce19402d2 100644 --- a/core/fxcodec/codec/ccodec_progressivedecoder.h +++ b/core/fxcodec/codec/ccodec_progressivedecoder.h @@ -16,9 +16,9 @@ #include "core/fxcodec/codec/ccodec_pngmodule.h" #include "core/fxcodec/codec/ccodec_tiffmodule.h" #include "core/fxcodec/fx_codec_def.h" -#include "core/fxcrt/cfx_retain_ptr.h" #include "core/fxcrt/cfx_unowned_ptr.h" #include "core/fxcrt/fx_system.h" +#include "core/fxcrt/retain_ptr.h" #include "core/fxge/fx_dib.h" class CCodec_ModuleMgr; @@ -44,11 +44,10 @@ class CCodec_ProgressiveDecoder : public CCodec_BmpModule::Delegate, explicit CCodec_ProgressiveDecoder(CCodec_ModuleMgr* pCodecMgr); virtual ~CCodec_ProgressiveDecoder(); - FXCODEC_STATUS LoadImageInfo( - const CFX_RetainPtr<IFX_SeekableReadStream>& pFile, - FXCODEC_IMAGE_TYPE imageType, - CFX_DIBAttribute* pAttribute, - bool bSkipImageTypeCheck); + FXCODEC_STATUS LoadImageInfo(const RetainPtr<IFX_SeekableReadStream>& pFile, + FXCODEC_IMAGE_TYPE imageType, + CFX_DIBAttribute* pAttribute, + bool bSkipImageTypeCheck); FXCODEC_IMAGE_TYPE GetType() const { return m_imagType; } int32_t GetWidth() const { return m_SrcWidth; } @@ -58,7 +57,7 @@ class CCodec_ProgressiveDecoder : public CCodec_BmpModule::Delegate, void SetClipBox(FX_RECT* clip); FXCODEC_STATUS GetFrames(int32_t& frames); - FXCODEC_STATUS StartDecode(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap, + FXCODEC_STATUS StartDecode(const RetainPtr<CFX_DIBitmap>& pDIBitmap, int start_x, int start_y, int size_x, @@ -158,38 +157,36 @@ class CCodec_ProgressiveDecoder : public CCodec_BmpModule::Delegate, FXCODEC_STATUS& err_status); bool GifReadMoreData(CCodec_GifModule* pGifModule, FXCODEC_STATUS& err_status); - 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); + void GifDoubleLineResampleVert(const RetainPtr<CFX_DIBitmap>& pDeviceBitmap, + double scale_y, + int des_row); + void PngOneOneMapResampleHorz(const 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(const CFX_RetainPtr<CFX_DIBitmap>& pDeviceBitmap, + void ReSampleScanline(const RetainPtr<CFX_DIBitmap>& pDeviceBitmap, int32_t des_line, uint8_t* src_scan, FXCodec_Format src_format); - void Resample(const CFX_RetainPtr<CFX_DIBitmap>& pDeviceBitmap, + void Resample(const RetainPtr<CFX_DIBitmap>& pDeviceBitmap, int32_t src_line, uint8_t* src_scan, FXCodec_Format src_format); - void ResampleVert(const CFX_RetainPtr<CFX_DIBitmap>& pDeviceBitmap, + void ResampleVert(const RetainPtr<CFX_DIBitmap>& pDeviceBitmap, double scale_y, int des_row); bool JpegReadMoreData(CCodec_JpegModule* pJpegModule, FXCODEC_STATUS& err_status); - void ResampleVertBT(const CFX_RetainPtr<CFX_DIBitmap>& pDeviceBitmap, + void ResampleVertBT(const RetainPtr<CFX_DIBitmap>& pDeviceBitmap, double scale_y, int des_row); - CFX_RetainPtr<IFX_SeekableReadStream> m_pFile; - CFX_RetainPtr<CFX_DIBitmap> m_pDeviceBitmap; + RetainPtr<IFX_SeekableReadStream> m_pFile; + RetainPtr<CFX_DIBitmap> m_pDeviceBitmap; CFX_UnownedPtr<CCodec_ModuleMgr> m_pCodecMgr; std::unique_ptr<CCodec_JpegModule::Context> m_pJpegContext; std::unique_ptr<CCodec_PngModule::Context> m_pPngContext; diff --git a/core/fxcodec/codec/ccodec_tiffmodule.cpp b/core/fxcodec/codec/ccodec_tiffmodule.cpp index e0cb719475..07d189200e 100644 --- a/core/fxcodec/codec/ccodec_tiffmodule.cpp +++ b/core/fxcodec/codec/ccodec_tiffmodule.cpp @@ -10,9 +10,9 @@ #include "core/fxcodec/codec/codec_int.h" #include "core/fxcodec/fx_codec.h" -#include "core/fxcrt/cfx_retain_ptr.h" #include "core/fxcrt/fx_safe_types.h" #include "core/fxcrt/fx_stream.h" +#include "core/fxcrt/retain_ptr.h" #include "core/fxge/dib/cfx_dibitmap.h" #include "core/fxge/fx_dib.h" #include "third_party/base/logging.h" @@ -27,39 +27,39 @@ class CTiffContext : public CCodec_TiffModule::Context { CTiffContext(); ~CTiffContext() override; - bool InitDecoder(const CFX_RetainPtr<IFX_SeekableReadStream>& file_ptr); + bool InitDecoder(const RetainPtr<IFX_SeekableReadStream>& file_ptr); bool LoadFrameInfo(int32_t frame, int32_t* width, int32_t* height, int32_t* comps, int32_t* bpc, CFX_DIBAttribute* pAttribute); - bool Decode(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap); + bool Decode(const RetainPtr<CFX_DIBitmap>& pDIBitmap); - CFX_RetainPtr<IFX_SeekableReadStream> io_in() const { return m_io_in; } + RetainPtr<IFX_SeekableReadStream> io_in() const { return m_io_in; } uint32_t offset() const { return m_offset; } void set_offset(uint32_t offset) { m_offset = offset; } private: - bool IsSupport(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap) const; - void SetPalette(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap, uint16_t bps); - bool Decode1bppRGB(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap, + bool IsSupport(const RetainPtr<CFX_DIBitmap>& pDIBitmap) const; + void SetPalette(const RetainPtr<CFX_DIBitmap>& pDIBitmap, uint16_t bps); + bool Decode1bppRGB(const RetainPtr<CFX_DIBitmap>& pDIBitmap, int32_t height, int32_t width, uint16_t bps, uint16_t spp); - bool Decode8bppRGB(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap, + bool Decode8bppRGB(const RetainPtr<CFX_DIBitmap>& pDIBitmap, int32_t height, int32_t width, uint16_t bps, uint16_t spp); - bool Decode24bppRGB(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap, + bool Decode24bppRGB(const RetainPtr<CFX_DIBitmap>& pDIBitmap, int32_t height, int32_t width, uint16_t bps, uint16_t spp); - CFX_RetainPtr<IFX_SeekableReadStream> m_io_in; + RetainPtr<IFX_SeekableReadStream> m_io_in; uint32_t m_offset; TIFF* m_tif_ctx; }; @@ -228,7 +228,7 @@ CTiffContext::~CTiffContext() { } bool CTiffContext::InitDecoder( - const CFX_RetainPtr<IFX_SeekableReadStream>& file_ptr) { + const RetainPtr<IFX_SeekableReadStream>& file_ptr) { m_io_in = file_ptr; m_tif_ctx = tiff_open(this, "r"); return !!m_tif_ctx; @@ -291,8 +291,7 @@ bool CTiffContext::LoadFrameInfo(int32_t frame, return true; } -bool CTiffContext::IsSupport( - const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap) const { +bool CTiffContext::IsSupport(const RetainPtr<CFX_DIBitmap>& pDIBitmap) const { if (TIFFIsTiled(m_tif_ctx)) return false; @@ -322,7 +321,7 @@ bool CTiffContext::IsSupport( return planarconfig != PLANARCONFIG_SEPARATE; } -void CTiffContext::SetPalette(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap, +void CTiffContext::SetPalette(const RetainPtr<CFX_DIBitmap>& pDIBitmap, uint16_t bps) { uint16_t* red_orig = nullptr; uint16_t* green_orig = nullptr; @@ -346,7 +345,7 @@ void CTiffContext::SetPalette(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap, } } -bool CTiffContext::Decode1bppRGB(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap, +bool CTiffContext::Decode1bppRGB(const RetainPtr<CFX_DIBitmap>& pDIBitmap, int32_t height, int32_t width, uint16_t bps, @@ -374,7 +373,7 @@ bool CTiffContext::Decode1bppRGB(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap, return true; } -bool CTiffContext::Decode8bppRGB(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap, +bool CTiffContext::Decode8bppRGB(const RetainPtr<CFX_DIBitmap>& pDIBitmap, int32_t height, int32_t width, uint16_t bps, @@ -410,7 +409,7 @@ bool CTiffContext::Decode8bppRGB(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap, return true; } -bool CTiffContext::Decode24bppRGB(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap, +bool CTiffContext::Decode24bppRGB(const RetainPtr<CFX_DIBitmap>& pDIBitmap, int32_t height, int32_t width, uint16_t bps, @@ -438,7 +437,7 @@ bool CTiffContext::Decode24bppRGB(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap, return true; } -bool CTiffContext::Decode(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap) { +bool CTiffContext::Decode(const RetainPtr<CFX_DIBitmap>& pDIBitmap) { uint32_t img_wid = pDIBitmap->GetWidth(); uint32_t img_hei = pDIBitmap->GetHeight(); uint32_t width = 0; @@ -480,7 +479,7 @@ bool CTiffContext::Decode(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap) { } std::unique_ptr<CCodec_TiffModule::Context> CCodec_TiffModule::CreateDecoder( - const CFX_RetainPtr<IFX_SeekableReadStream>& file_ptr) { + const RetainPtr<IFX_SeekableReadStream>& file_ptr) { auto pDecoder = pdfium::MakeUnique<CTiffContext>(); if (!pDecoder->InitDecoder(file_ptr)) return nullptr; @@ -500,7 +499,7 @@ bool CCodec_TiffModule::LoadFrameInfo(Context* pContext, } bool CCodec_TiffModule::Decode(Context* pContext, - const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap) { + const RetainPtr<CFX_DIBitmap>& pDIBitmap) { auto* ctx = static_cast<CTiffContext*>(pContext); return ctx->Decode(pDIBitmap); } diff --git a/core/fxcodec/codec/ccodec_tiffmodule.h b/core/fxcodec/codec/ccodec_tiffmodule.h index 6e6e36b697..8d3bed7df2 100644 --- a/core/fxcodec/codec/ccodec_tiffmodule.h +++ b/core/fxcodec/codec/ccodec_tiffmodule.h @@ -9,8 +9,8 @@ #include <memory> -#include "core/fxcrt/cfx_retain_ptr.h" #include "core/fxcrt/fx_system.h" +#include "core/fxcrt/retain_ptr.h" #include "core/fxge/dib/cfx_dibitmap.h" class CFX_DIBAttribute; @@ -24,7 +24,7 @@ class CCodec_TiffModule { }; std::unique_ptr<Context> CreateDecoder( - const CFX_RetainPtr<IFX_SeekableReadStream>& file_ptr); + const RetainPtr<IFX_SeekableReadStream>& file_ptr); bool LoadFrameInfo(Context* ctx, int32_t frame, int32_t* width, @@ -32,7 +32,7 @@ class CCodec_TiffModule { int32_t* comps, int32_t* bpc, CFX_DIBAttribute* pAttribute); - bool Decode(Context* ctx, const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap); + bool Decode(Context* ctx, const RetainPtr<CFX_DIBitmap>& pDIBitmap); }; #endif // CORE_FXCODEC_CODEC_CCODEC_TIFFMODULE_H_ diff --git a/core/fxcodec/codec/fx_codec_jbig.cpp b/core/fxcodec/codec/fx_codec_jbig.cpp index f6ace30dd3..543aeebc87 100644 --- a/core/fxcodec/codec/fx_codec_jbig.cpp +++ b/core/fxcodec/codec/fx_codec_jbig.cpp @@ -44,8 +44,8 @@ FXCODEC_STATUS CCodec_Jbig2Module::StartDecode( std::unique_ptr<JBig2_DocumentContext>* pContextHolder, uint32_t width, uint32_t height, - const CFX_RetainPtr<CPDF_StreamAcc>& src_stream, - const CFX_RetainPtr<CPDF_StreamAcc>& global_stream, + const RetainPtr<CPDF_StreamAcc>& src_stream, + const RetainPtr<CPDF_StreamAcc>& global_stream, uint8_t* dest_buf, uint32_t dest_pitch, IFX_PauseIndicator* pPause) { diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp index 1084529c7d..ea32f00a2e 100644 --- a/core/fxcodec/codec/fx_codec_jpeg.cpp +++ b/core/fxcodec/codec/fx_codec_jpeg.cpp @@ -508,7 +508,7 @@ uint32_t CCodec_JpegModule::GetAvailInput(Context* pContext, #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ #define JPEG_BLOCK_SIZE 1048576 -bool CCodec_JpegModule::JpegEncode(const CFX_RetainPtr<CFX_DIBSource>& pSource, +bool CCodec_JpegModule::JpegEncode(const RetainPtr<CFX_DIBSource>& pSource, uint8_t** dest_buf, FX_STRSIZE* dest_size) { struct jpeg_error_mgr jerr; diff --git a/core/fxcodec/codec/fx_codec_progress.cpp b/core/fxcodec/codec/fx_codec_progress.cpp index a70041bff9..8b90d3ab84 100644 --- a/core/fxcodec/codec/fx_codec_progress.cpp +++ b/core/fxcodec/codec/fx_codec_progress.cpp @@ -396,7 +396,7 @@ bool CCodec_ProgressiveDecoder::PngReadHeader(int width, } bool CCodec_ProgressiveDecoder::PngAskScanlineBuf(int line, uint8_t*& src_buf) { - CFX_RetainPtr<CFX_DIBitmap> pDIBitmap = m_pDeviceBitmap; + RetainPtr<CFX_DIBitmap> pDIBitmap = m_pDeviceBitmap; if (!pDIBitmap) { NOTREACHED(); return false; @@ -465,7 +465,7 @@ bool CCodec_ProgressiveDecoder::PngAskScanlineBuf(int line, uint8_t*& src_buf) { } void CCodec_ProgressiveDecoder::PngOneOneMapResampleHorz( - const CFX_RetainPtr<CFX_DIBitmap>& pDeviceBitmap, + const RetainPtr<CFX_DIBitmap>& pDeviceBitmap, int32_t des_line, uint8_t* src_scan, FXCodec_Format src_format) { @@ -538,7 +538,7 @@ void CCodec_ProgressiveDecoder::PngOneOneMapResampleHorz( void CCodec_ProgressiveDecoder::PngFillScanlineBufCompleted(int pass, int line) { - CFX_RetainPtr<CFX_DIBitmap> pDIBitmap = m_pDeviceBitmap; + RetainPtr<CFX_DIBitmap> pDIBitmap = m_pDeviceBitmap; ASSERT(pDIBitmap); int src_top = m_clipBox.top; int src_bottom = m_clipBox.bottom; @@ -645,7 +645,7 @@ bool CCodec_ProgressiveDecoder::GifInputRecordPositionBuf( m_GifFrameRect = img_rc; m_SrcPassNumber = interlace ? 4 : 1; int32_t pal_index = m_GifBgIndex; - CFX_RetainPtr<CFX_DIBitmap> pDevice = m_pDeviceBitmap; + RetainPtr<CFX_DIBitmap> pDevice = m_pDeviceBitmap; if (trans_index >= pal_num) trans_index = -1; if (trans_index != -1) { @@ -695,7 +695,7 @@ bool CCodec_ProgressiveDecoder::GifInputRecordPositionBuf( void CCodec_ProgressiveDecoder::GifReadScanline(int32_t row_num, uint8_t* row_buf) { - CFX_RetainPtr<CFX_DIBitmap> pDIBitmap = m_pDeviceBitmap; + RetainPtr<CFX_DIBitmap> pDIBitmap = m_pDeviceBitmap; ASSERT(pDIBitmap); int32_t img_width = m_GifFrameRect.Width(); if (!pDIBitmap->HasAlpha()) { @@ -757,7 +757,7 @@ void CCodec_ProgressiveDecoder::GifReadScanline(int32_t row_num, } void CCodec_ProgressiveDecoder::GifDoubleLineResampleVert( - const CFX_RetainPtr<CFX_DIBitmap>& pDeviceBitmap, + const RetainPtr<CFX_DIBitmap>& pDeviceBitmap, double scale_y, int des_row) { int des_Bpp = pDeviceBitmap->GetBPP() >> 3; @@ -883,7 +883,7 @@ bool CCodec_ProgressiveDecoder::BmpInputImagePositionBuf(uint32_t rcd_pos) { void CCodec_ProgressiveDecoder::BmpReadScanline( uint32_t row_num, const std::vector<uint8_t>& row_buf) { - CFX_RetainPtr<CFX_DIBitmap> pDIBitmap = m_pDeviceBitmap; + RetainPtr<CFX_DIBitmap> pDIBitmap = m_pDeviceBitmap; ASSERT(pDIBitmap); std::copy(row_buf.begin(), row_buf.begin() + m_ScanlineSize, m_pDecodeBuf); int src_top = m_clipBox.top; @@ -914,7 +914,7 @@ void CCodec_ProgressiveDecoder::BmpReadScanline( } void CCodec_ProgressiveDecoder::ResampleVertBT( - const CFX_RetainPtr<CFX_DIBitmap>& pDeviceBitmap, + const RetainPtr<CFX_DIBitmap>& pDeviceBitmap, double scale_y, int des_row) { int des_Bpp = pDeviceBitmap->GetBPP() >> 3; @@ -1254,7 +1254,7 @@ bool CCodec_ProgressiveDecoder::DetectImageType(FXCODEC_IMAGE_TYPE imageType, } FXCODEC_STATUS CCodec_ProgressiveDecoder::LoadImageInfo( - const CFX_RetainPtr<IFX_SeekableReadStream>& pFile, + const RetainPtr<IFX_SeekableReadStream>& pFile, FXCODEC_IMAGE_TYPE imageType, CFX_DIBAttribute* pAttribute, bool bSkipImageTypeCheck) { @@ -1446,7 +1446,7 @@ void CCodec_ProgressiveDecoder::GetTransMethod(FXDIB_Format des_format, } void CCodec_ProgressiveDecoder::ReSampleScanline( - const CFX_RetainPtr<CFX_DIBitmap>& pDeviceBitmap, + const RetainPtr<CFX_DIBitmap>& pDeviceBitmap, int des_line, uint8_t* src_scan, FXCodec_Format src_format) { @@ -1653,7 +1653,7 @@ void CCodec_ProgressiveDecoder::ReSampleScanline( } void CCodec_ProgressiveDecoder::ResampleVert( - const CFX_RetainPtr<CFX_DIBitmap>& pDeviceBitmap, + const RetainPtr<CFX_DIBitmap>& pDeviceBitmap, double scale_y, int des_row) { int des_Bpp = pDeviceBitmap->GetBPP() >> 3; @@ -1769,7 +1769,7 @@ void CCodec_ProgressiveDecoder::ResampleVert( } void CCodec_ProgressiveDecoder::Resample( - const CFX_RetainPtr<CFX_DIBitmap>& pDeviceBitmap, + const RetainPtr<CFX_DIBitmap>& pDeviceBitmap, int32_t src_line, uint8_t* src_scan, FXCodec_Format src_format) { @@ -1837,7 +1837,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::GetFrames(int32_t& frames) { } FXCODEC_STATUS CCodec_ProgressiveDecoder::StartDecode( - const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap, + const RetainPtr<CFX_DIBitmap>& pDIBitmap, int start_x, int start_y, int size_x, @@ -2206,7 +2206,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode() { m_status = FXCODEC_STATUS_ERROR; return m_status; } - CFX_RetainPtr<CFX_DIBitmap> pClipBitmap = + RetainPtr<CFX_DIBitmap> pClipBitmap = (m_clipBox.left == 0 && m_clipBox.top == 0 && m_clipBox.right == m_SrcWidth && m_clipBox.bottom == m_SrcHeight) ? pDIBitmap @@ -2217,7 +2217,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode() { m_status = FXCODEC_STATUS_ERR_MEMORY; return m_status; } - CFX_RetainPtr<CFX_DIBitmap> pFormatBitmap; + RetainPtr<CFX_DIBitmap> pFormatBitmap; switch (m_pDeviceBitmap->GetFormat()) { case FXDIB_8bppRgb: pFormatBitmap = pdfium::MakeRetain<CFX_DIBitmap>(); @@ -2289,7 +2289,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode() { m_status = FXCODEC_STATUS_ERR_MEMORY; return m_status; } - CFX_RetainPtr<CFX_DIBitmap> pStrechBitmap = pFormatBitmap->StretchTo( + RetainPtr<CFX_DIBitmap> pStrechBitmap = pFormatBitmap->StretchTo( m_sizeX, m_sizeY, m_bInterpol ? FXDIB_INTERPOL : FXDIB_DOWNSAMPLE, nullptr); pFormatBitmap = nullptr; diff --git a/core/fxcodec/jbig2/JBig2_BitStream.cpp b/core/fxcodec/jbig2/JBig2_BitStream.cpp index 921fa2a661..a72099d4ff 100644 --- a/core/fxcodec/jbig2/JBig2_BitStream.cpp +++ b/core/fxcodec/jbig2/JBig2_BitStream.cpp @@ -11,8 +11,7 @@ #include "core/fpdfapi/parser/cpdf_stream.h" #include "core/fpdfapi/parser/cpdf_stream_acc.h" -CJBig2_BitStream::CJBig2_BitStream( - const CFX_RetainPtr<CPDF_StreamAcc>& pSrcStream) +CJBig2_BitStream::CJBig2_BitStream(const RetainPtr<CPDF_StreamAcc>& pSrcStream) : m_pBuf(pSrcStream->GetData()), m_dwLength(pSrcStream->GetSize()), m_dwByteIdx(0), diff --git a/core/fxcodec/jbig2/JBig2_BitStream.h b/core/fxcodec/jbig2/JBig2_BitStream.h index 0be6c4b977..0edb432dde 100644 --- a/core/fxcodec/jbig2/JBig2_BitStream.h +++ b/core/fxcodec/jbig2/JBig2_BitStream.h @@ -7,13 +7,13 @@ #ifndef CORE_FXCODEC_JBIG2_JBIG2_BITSTREAM_H_ #define CORE_FXCODEC_JBIG2_JBIG2_BITSTREAM_H_ -#include "core/fxcrt/cfx_retain_ptr.h" +#include "core/fxcrt/retain_ptr.h" class CPDF_StreamAcc; class CJBig2_BitStream { public: - explicit CJBig2_BitStream(const CFX_RetainPtr<CPDF_StreamAcc>& pSrcStream); + explicit CJBig2_BitStream(const RetainPtr<CPDF_StreamAcc>& pSrcStream); ~CJBig2_BitStream(); // TODO(thestig): readFoo() should return bool. diff --git a/core/fxcodec/jbig2/JBig2_Context.cpp b/core/fxcodec/jbig2/JBig2_Context.cpp index 363be2fc31..7c79ad8802 100644 --- a/core/fxcodec/jbig2/JBig2_Context.cpp +++ b/core/fxcodec/jbig2/JBig2_Context.cpp @@ -48,11 +48,10 @@ size_t GetRefAggContextSize(bool val) { // difference for typical JBIG2 documents. static const int kSymbolDictCacheMaxSize = 2; -CJBig2_Context::CJBig2_Context( - const CFX_RetainPtr<CPDF_StreamAcc>& pGlobalStream, - const CFX_RetainPtr<CPDF_StreamAcc>& pSrcStream, - std::list<CJBig2_CachePair>* pSymbolDictCache, - bool bIsGlobal) +CJBig2_Context::CJBig2_Context(const RetainPtr<CPDF_StreamAcc>& pGlobalStream, + const RetainPtr<CPDF_StreamAcc>& pSrcStream, + std::list<CJBig2_CachePair>* pSymbolDictCache, + bool bIsGlobal) : m_nSegmentDecoded(0), m_bInPage(false), m_bBufSpecified(false), diff --git a/core/fxcodec/jbig2/JBig2_Context.h b/core/fxcodec/jbig2/JBig2_Context.h index c88fc6f187..bed1079db9 100644 --- a/core/fxcodec/jbig2/JBig2_Context.h +++ b/core/fxcodec/jbig2/JBig2_Context.h @@ -40,8 +40,8 @@ using CJBig2_CachePair = class CJBig2_Context { public: - CJBig2_Context(const CFX_RetainPtr<CPDF_StreamAcc>& pGlobalStream, - const CFX_RetainPtr<CPDF_StreamAcc>& pSrcStream, + CJBig2_Context(const RetainPtr<CPDF_StreamAcc>& pGlobalStream, + const RetainPtr<CPDF_StreamAcc>& pSrcStream, std::list<CJBig2_CachePair>* pSymbolDictCache, bool bIsGlobal); ~CJBig2_Context(); |