summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_image.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-24 14:07:18 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-24 21:19:30 +0000
commit4734512572776f8fc705e28fba8a46d981372e99 (patch)
treef791427bf7d0acfb590880c8bcc1f4c4c370dba6 /core/fpdfapi/page/cpdf_image.cpp
parenta38f7989beacdf0a73441e4096d9ce7a196b10d3 (diff)
downloadpdfium-4734512572776f8fc705e28fba8a46d981372e99.tar.xz
Convert to CFX_UnownedPtr, part 8chromium/3110
Change-Id: I99d6b4df72e369652301c36e4046f03ef95ed07d Reviewed-on: https://pdfium-review.googlesource.com/5837 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_image.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_image.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/fpdfapi/page/cpdf_image.cpp b/core/fpdfapi/page/cpdf_image.cpp
index 7d16dd9618..efdd66b442 100644
--- a/core/fpdfapi/page/cpdf_image.cpp
+++ b/core/fpdfapi/page/cpdf_image.cpp
@@ -234,8 +234,8 @@ void CPDF_Image::SetImage(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap) {
pdfium::MakeUnique<CPDF_Dictionary>(m_pDocument->GetByteStringPool());
CPDF_Stream* pCTS = m_pDocument->NewIndirect<CPDF_Stream>(
std::move(pColorTable), iPalette * 3, std::move(pNewDict));
- pCS->AddNew<CPDF_Reference>(m_pDocument, pCTS->GetObjNum());
- pDict->SetNewFor<CPDF_Reference>("ColorSpace", m_pDocument,
+ pCS->AddNew<CPDF_Reference>(m_pDocument.Get(), pCTS->GetObjNum());
+ pDict->SetNewFor<CPDF_Reference>("ColorSpace", m_pDocument.Get(),
pCS->GetObjNum());
} else {
pDict->SetNewFor<CPDF_Name>("ColorSpace", "DeviceGray");
@@ -277,7 +277,7 @@ void CPDF_Image::SetImage(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap) {
pMaskDict->SetNewFor<CPDF_Number>("Length", mask_size);
CPDF_Stream* pNewStream = m_pDocument->NewIndirect<CPDF_Stream>(
std::move(mask_buf), mask_size, std::move(pMaskDict));
- pDict->SetNewFor<CPDF_Reference>("SMask", m_pDocument,
+ pDict->SetNewFor<CPDF_Reference>("SMask", m_pDocument.Get(),
pNewStream->GetObjNum());
}
@@ -329,7 +329,7 @@ void CPDF_Image::ResetCache(CPDF_Page* pPage,
CFX_RetainPtr<CFX_DIBSource> CPDF_Image::LoadDIBSource() const {
auto source = pdfium::MakeRetain<CPDF_DIBSource>();
- if (!source->Load(m_pDocument, m_pStream.Get()))
+ if (!source->Load(m_pDocument.Get(), m_pStream.Get()))
return nullptr;
return source;
@@ -349,7 +349,7 @@ bool CPDF_Image::StartLoadDIBSource(CPDF_Dictionary* pFormResource,
uint32_t GroupFamily,
bool bLoadMask) {
auto source = pdfium::MakeRetain<CPDF_DIBSource>();
- int ret = source->StartLoadDIBSource(m_pDocument, m_pStream.Get(), true,
+ int ret = source->StartLoadDIBSource(m_pDocument.Get(), m_pStream.Get(), true,
pFormResource, pPageResource, bStdCS,
GroupFamily, bLoadMask);
if (!ret) {