summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_image.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-09-21 15:49:49 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-21 20:17:31 +0000
commit0b95042db2e6dab5876abd12ce485fff0a8e08fe (patch)
tree02132ed53945fde30bfbf230ff4e9b5308dd7732 /core/fpdfapi/page/cpdf_image.cpp
parenta5eb9f05b7c3f82630784e043ccf75c4e019b18f (diff)
downloadpdfium-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/fpdfapi/page/cpdf_image.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_image.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/core/fpdfapi/page/cpdf_image.cpp b/core/fpdfapi/page/cpdf_image.cpp
index f748b6950d..4c08336e3a 100644
--- a/core/fpdfapi/page/cpdf_image.cpp
+++ b/core/fpdfapi/page/cpdf_image.cpp
@@ -117,8 +117,7 @@ std::unique_ptr<CPDF_Dictionary> CPDF_Image::InitJPEG(uint8_t* pData,
return pDict;
}
-void CPDF_Image::SetJpegImage(
- const CFX_RetainPtr<IFX_SeekableReadStream>& pFile) {
+void CPDF_Image::SetJpegImage(const RetainPtr<IFX_SeekableReadStream>& pFile) {
uint32_t size = pdfium::base::checked_cast<uint32_t>(pFile->GetSize());
if (!size)
return;
@@ -142,7 +141,7 @@ void CPDF_Image::SetJpegImage(
}
void CPDF_Image::SetJpegImageInline(
- const CFX_RetainPtr<IFX_SeekableReadStream>& pFile) {
+ const RetainPtr<IFX_SeekableReadStream>& pFile) {
uint32_t size = pdfium::base::checked_cast<uint32_t>(pFile->GetSize());
if (!size)
return;
@@ -158,7 +157,7 @@ void CPDF_Image::SetJpegImageInline(
m_pStream->InitStream(&(data[0]), size, std::move(pDict));
}
-void CPDF_Image::SetImage(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap) {
+void CPDF_Image::SetImage(const RetainPtr<CFX_DIBitmap>& pBitmap) {
int32_t BitmapWidth = pBitmap->GetWidth();
int32_t BitmapHeight = pBitmap->GetHeight();
if (BitmapWidth < 1 || BitmapHeight < 1)
@@ -250,7 +249,7 @@ void CPDF_Image::SetImage(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap) {
bCopyWithoutAlpha = false;
}
- CFX_RetainPtr<CFX_DIBitmap> pMaskBitmap;
+ RetainPtr<CFX_DIBitmap> pMaskBitmap;
if (pBitmap->HasAlpha())
pMaskBitmap = pBitmap->CloneAlphaMask();
@@ -323,12 +322,12 @@ void CPDF_Image::SetImage(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap) {
}
void CPDF_Image::ResetCache(CPDF_Page* pPage,
- const CFX_RetainPtr<CFX_DIBitmap>& pBitmap) {
- CFX_RetainPtr<CPDF_Image> pHolder(this);
+ const RetainPtr<CFX_DIBitmap>& pBitmap) {
+ RetainPtr<CPDF_Image> pHolder(this);
pPage->GetRenderCache()->ResetBitmap(pHolder, pBitmap);
}
-CFX_RetainPtr<CFX_DIBSource> CPDF_Image::LoadDIBSource() const {
+RetainPtr<CFX_DIBSource> CPDF_Image::LoadDIBSource() const {
auto source = pdfium::MakeRetain<CPDF_DIBSource>();
if (!source->Load(m_pDocument.Get(), m_pStream.Get()))
return nullptr;
@@ -336,11 +335,11 @@ CFX_RetainPtr<CFX_DIBSource> CPDF_Image::LoadDIBSource() const {
return source;
}
-CFX_RetainPtr<CFX_DIBSource> CPDF_Image::DetachBitmap() {
+RetainPtr<CFX_DIBSource> CPDF_Image::DetachBitmap() {
return std::move(m_pDIBSource);
}
-CFX_RetainPtr<CFX_DIBSource> CPDF_Image::DetachMask() {
+RetainPtr<CFX_DIBSource> CPDF_Image::DetachMask() {
return std::move(m_pMask);
}
@@ -367,7 +366,7 @@ bool CPDF_Image::StartLoadDIBSource(CPDF_Dictionary* pFormResource,
}
bool CPDF_Image::Continue(IFX_PauseIndicator* pPause) {
- CFX_RetainPtr<CPDF_DIBSource> pSource = m_pDIBSource.As<CPDF_DIBSource>();
+ RetainPtr<CPDF_DIBSource> pSource = m_pDIBSource.As<CPDF_DIBSource>();
int ret = pSource->ContinueLoadDIBSource(pPause);
if (!ret) {
m_pDIBSource.Reset();