summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render
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/render
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/render')
-rw-r--r--core/fpdfapi/render/cpdf_devicebuffer.h6
-rw-r--r--core/fpdfapi/render/cpdf_dibsource.cpp2
-rw-r--r--core/fpdfapi/render/cpdf_dibsource.h14
-rw-r--r--core/fpdfapi/render/cpdf_dibtransferfunc.cpp2
-rw-r--r--core/fpdfapi/render/cpdf_dibtransferfunc.h6
-rw-r--r--core/fpdfapi/render/cpdf_docrenderdata.cpp4
-rw-r--r--core/fpdfapi/render/cpdf_docrenderdata.h8
-rw-r--r--core/fpdfapi/render/cpdf_imagecacheentry.cpp13
-rw-r--r--core/fpdfapi/render/cpdf_imagecacheentry.h20
-rw-r--r--core/fpdfapi/render/cpdf_imageloader.cpp2
-rw-r--r--core/fpdfapi/render/cpdf_imageloader.h6
-rw-r--r--core/fpdfapi/render/cpdf_imagerenderer.cpp14
-rw-r--r--core/fpdfapi/render/cpdf_imagerenderer.h8
-rw-r--r--core/fpdfapi/render/cpdf_pagerendercache.cpp7
-rw-r--r--core/fpdfapi/render/cpdf_pagerendercache.h8
-rw-r--r--core/fpdfapi/render/cpdf_rendercontext.cpp9
-rw-r--r--core/fpdfapi/render/cpdf_rendercontext.h4
-rw-r--r--core/fpdfapi/render/cpdf_renderoptions.h4
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp60
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.h22
-rw-r--r--core/fpdfapi/render/cpdf_transferfunc.cpp6
-rw-r--r--core/fpdfapi/render/cpdf_transferfunc.h9
-rw-r--r--core/fpdfapi/render/cpdf_type3cache.cpp7
-rw-r--r--core/fpdfapi/render/cpdf_type3cache.h6
24 files changed, 121 insertions, 126 deletions
diff --git a/core/fpdfapi/render/cpdf_devicebuffer.h b/core/fpdfapi/render/cpdf_devicebuffer.h
index bfab27503b..2146c9761f 100644
--- a/core/fpdfapi/render/cpdf_devicebuffer.h
+++ b/core/fpdfapi/render/cpdf_devicebuffer.h
@@ -9,9 +9,9 @@
#include <memory>
-#include "core/fxcrt/cfx_retain_ptr.h"
#include "core/fxcrt/cfx_unowned_ptr.h"
#include "core/fxcrt/fx_coordinates.h"
+#include "core/fxcrt/retain_ptr.h"
class CFX_DIBitmap;
class CFX_RenderDevice;
@@ -29,14 +29,14 @@ class CPDF_DeviceBuffer {
const CPDF_PageObject* pObj,
int max_dpi);
void OutputToDevice();
- CFX_RetainPtr<CFX_DIBitmap> GetBitmap() const { return m_pBitmap; }
+ RetainPtr<CFX_DIBitmap> GetBitmap() const { return m_pBitmap; }
const CFX_Matrix* GetMatrix() const { return &m_Matrix; }
private:
CFX_UnownedPtr<CFX_RenderDevice> m_pDevice;
CFX_UnownedPtr<CPDF_RenderContext> m_pContext;
CFX_UnownedPtr<const CPDF_PageObject> m_pObject;
- CFX_RetainPtr<CFX_DIBitmap> m_pBitmap;
+ RetainPtr<CFX_DIBitmap> m_pBitmap;
FX_RECT m_Rect;
CFX_Matrix m_Matrix;
};
diff --git a/core/fpdfapi/render/cpdf_dibsource.cpp b/core/fpdfapi/render/cpdf_dibsource.cpp
index c6a5632055..5104f7b618 100644
--- a/core/fpdfapi/render/cpdf_dibsource.cpp
+++ b/core/fpdfapi/render/cpdf_dibsource.cpp
@@ -752,7 +752,7 @@ int CPDF_DIBSource::ContinueLoadMaskDIB(IFX_PauseIndicator* pPause) {
return 1;
}
-CFX_RetainPtr<CPDF_DIBSource> CPDF_DIBSource::DetachMask() {
+RetainPtr<CPDF_DIBSource> CPDF_DIBSource::DetachMask() {
return std::move(m_pMask);
}
diff --git a/core/fpdfapi/render/cpdf_dibsource.h b/core/fpdfapi/render/cpdf_dibsource.h
index f6883ed263..08c4afe862 100644
--- a/core/fpdfapi/render/cpdf_dibsource.h
+++ b/core/fpdfapi/render/cpdf_dibsource.h
@@ -18,8 +18,8 @@
#include "core/fpdfapi/render/cpdf_imageloader.h"
#include "core/fpdfapi/render/cpdf_rendercontext.h"
#include "core/fpdfapi/render/cpdf_renderoptions.h"
-#include "core/fxcrt/cfx_retain_ptr.h"
#include "core/fxcrt/cfx_unowned_ptr.h"
+#include "core/fxcrt/retain_ptr.h"
#include "core/fxge/cfx_defaultrenderdevice.h"
#include "core/fxge/cfx_renderdevice.h"
@@ -42,7 +42,7 @@ typedef struct {
class CPDF_DIBSource : public CFX_DIBSource {
public:
template <typename T, typename... Args>
- friend CFX_RetainPtr<T> pdfium::MakeRetain(Args&&... args);
+ friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
~CPDF_DIBSource() override;
@@ -76,7 +76,7 @@ class CPDF_DIBSource : public CFX_DIBSource {
int StartLoadMaskDIB();
int ContinueLoadMaskDIB(IFX_PauseIndicator* pPause);
int ContinueToLoadMask();
- CFX_RetainPtr<CPDF_DIBSource> DetachMask();
+ RetainPtr<CPDF_DIBSource> DetachMask();
private:
CPDF_DIBSource();
@@ -125,7 +125,7 @@ class CPDF_DIBSource : public CFX_DIBSource {
CFX_UnownedPtr<CPDF_Document> m_pDocument;
CFX_UnownedPtr<const CPDF_Stream> m_pStream;
CFX_UnownedPtr<const CPDF_Dictionary> m_pDict;
- CFX_RetainPtr<CPDF_StreamAcc> m_pStreamAcc;
+ RetainPtr<CPDF_StreamAcc> m_pStreamAcc;
CPDF_ColorSpace* m_pColorSpace;
uint32_t m_Family;
uint32_t m_bpc;
@@ -143,9 +143,9 @@ class CPDF_DIBSource : public CFX_DIBSource {
DIB_COMP_DATA* m_pCompData;
uint8_t* m_pLineBuf;
uint8_t* m_pMaskedLine;
- CFX_RetainPtr<CFX_DIBitmap> m_pCachedBitmap;
- CFX_RetainPtr<CPDF_DIBSource> m_pMask;
- CFX_RetainPtr<CPDF_StreamAcc> m_pGlobalStream;
+ RetainPtr<CFX_DIBitmap> m_pCachedBitmap;
+ RetainPtr<CPDF_DIBSource> m_pMask;
+ RetainPtr<CPDF_StreamAcc> m_pGlobalStream;
std::unique_ptr<CCodec_ScanlineDecoder> m_pDecoder;
std::unique_ptr<CCodec_Jbig2Context> m_pJbig2Context;
CFX_UnownedPtr<CPDF_Stream> m_pMaskStream;
diff --git a/core/fpdfapi/render/cpdf_dibtransferfunc.cpp b/core/fpdfapi/render/cpdf_dibtransferfunc.cpp
index 6ba148e15c..be2c9f30bb 100644
--- a/core/fpdfapi/render/cpdf_dibtransferfunc.cpp
+++ b/core/fpdfapi/render/cpdf_dibtransferfunc.cpp
@@ -12,7 +12,7 @@
#include "core/fpdfapi/render/cpdf_transferfunc.h"
CPDF_DIBTransferFunc::CPDF_DIBTransferFunc(
- const CFX_RetainPtr<CPDF_TransferFunc>& pTransferFunc)
+ const RetainPtr<CPDF_TransferFunc>& pTransferFunc)
: m_pTransferFunc(pTransferFunc) {
m_RampR = pTransferFunc->m_Samples;
m_RampG = &pTransferFunc->m_Samples[256];
diff --git a/core/fpdfapi/render/cpdf_dibtransferfunc.h b/core/fpdfapi/render/cpdf_dibtransferfunc.h
index b22ae9c775..442811b97e 100644
--- a/core/fpdfapi/render/cpdf_dibtransferfunc.h
+++ b/core/fpdfapi/render/cpdf_dibtransferfunc.h
@@ -17,7 +17,7 @@ class CPDF_TransferFunc;
class CPDF_DIBTransferFunc : public CFX_FilteredDIB {
public:
template <typename T, typename... Args>
- friend CFX_RetainPtr<T> pdfium::MakeRetain(Args&&... args);
+ friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
~CPDF_DIBTransferFunc() override;
@@ -33,12 +33,12 @@ class CPDF_DIBTransferFunc : public CFX_FilteredDIB {
private:
explicit CPDF_DIBTransferFunc(
- const CFX_RetainPtr<CPDF_TransferFunc>& pTransferFunc);
+ const RetainPtr<CPDF_TransferFunc>& pTransferFunc);
const uint8_t* m_RampR;
const uint8_t* m_RampG;
const uint8_t* m_RampB;
- CFX_RetainPtr<CPDF_TransferFunc> m_pTransferFunc;
+ RetainPtr<CPDF_TransferFunc> m_pTransferFunc;
};
#endif // CORE_FPDFAPI_RENDER_CPDF_DIBTRANSFERFUNC_H_
diff --git a/core/fpdfapi/render/cpdf_docrenderdata.cpp b/core/fpdfapi/render/cpdf_docrenderdata.cpp
index bf277f03f8..3b16013bc5 100644
--- a/core/fpdfapi/render/cpdf_docrenderdata.cpp
+++ b/core/fpdfapi/render/cpdf_docrenderdata.cpp
@@ -44,7 +44,7 @@ void CPDF_DocRenderData::Clear(bool bRelease) {
}
}
-CFX_RetainPtr<CPDF_Type3Cache> CPDF_DocRenderData::GetCachedType3(
+RetainPtr<CPDF_Type3Cache> CPDF_DocRenderData::GetCachedType3(
CPDF_Type3Font* pFont) {
auto it = m_Type3FaceMap.find(pFont);
if (it != m_Type3FaceMap.end())
@@ -61,7 +61,7 @@ void CPDF_DocRenderData::MaybePurgeCachedType3(CPDF_Type3Font* pFont) {
m_Type3FaceMap.erase(it);
}
-CFX_RetainPtr<CPDF_TransferFunc> CPDF_DocRenderData::GetTransferFunc(
+RetainPtr<CPDF_TransferFunc> CPDF_DocRenderData::GetTransferFunc(
CPDF_Object* pObj) {
if (!pObj)
return nullptr;
diff --git a/core/fpdfapi/render/cpdf_docrenderdata.h b/core/fpdfapi/render/cpdf_docrenderdata.h
index 949a079126..efc4741e5e 100644
--- a/core/fpdfapi/render/cpdf_docrenderdata.h
+++ b/core/fpdfapi/render/cpdf_docrenderdata.h
@@ -25,18 +25,18 @@ class CPDF_DocRenderData {
explicit CPDF_DocRenderData(CPDF_Document* pPDFDoc);
~CPDF_DocRenderData();
- CFX_RetainPtr<CPDF_Type3Cache> GetCachedType3(CPDF_Type3Font* pFont);
+ RetainPtr<CPDF_Type3Cache> GetCachedType3(CPDF_Type3Font* pFont);
void MaybePurgeCachedType3(CPDF_Type3Font* pFont);
- CFX_RetainPtr<CPDF_TransferFunc> GetTransferFunc(CPDF_Object* pObj);
+ RetainPtr<CPDF_TransferFunc> GetTransferFunc(CPDF_Object* pObj);
void MaybePurgeTransferFunc(CPDF_Object* pOb);
void Clear(bool bRelease);
private:
CFX_UnownedPtr<CPDF_Document> m_pPDFDoc;
- std::map<CPDF_Font*, CFX_RetainPtr<CPDF_Type3Cache>> m_Type3FaceMap;
- std::map<CPDF_Object*, CFX_RetainPtr<CPDF_TransferFunc>> m_TransferFuncMap;
+ std::map<CPDF_Font*, RetainPtr<CPDF_Type3Cache>> m_Type3FaceMap;
+ std::map<CPDF_Object*, RetainPtr<CPDF_TransferFunc>> m_TransferFuncMap;
};
#endif // CORE_FPDFAPI_RENDER_CPDF_DOCRENDERDATA_H_
diff --git a/core/fpdfapi/render/cpdf_imagecacheentry.cpp b/core/fpdfapi/render/cpdf_imagecacheentry.cpp
index 4f98b96726..666839b0f2 100644
--- a/core/fpdfapi/render/cpdf_imagecacheentry.cpp
+++ b/core/fpdfapi/render/cpdf_imagecacheentry.cpp
@@ -18,9 +18,8 @@
#include "core/fpdfapi/render/cpdf_rendercontext.h"
#include "core/fpdfapi/render/cpdf_renderstatus.h"
-CPDF_ImageCacheEntry::CPDF_ImageCacheEntry(
- CPDF_Document* pDoc,
- const CFX_RetainPtr<CPDF_Image>& pImage)
+CPDF_ImageCacheEntry::CPDF_ImageCacheEntry(CPDF_Document* pDoc,
+ const RetainPtr<CPDF_Image>& pImage)
: m_dwTimeCount(0),
m_MatteColor(0),
m_pDocument(pDoc),
@@ -29,7 +28,7 @@ CPDF_ImageCacheEntry::CPDF_ImageCacheEntry(
CPDF_ImageCacheEntry::~CPDF_ImageCacheEntry() {}
-void CPDF_ImageCacheEntry::Reset(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap) {
+void CPDF_ImageCacheEntry::Reset(const RetainPtr<CFX_DIBitmap>& pBitmap) {
m_pCachedBitmap.Reset();
if (pBitmap)
m_pCachedBitmap = pBitmap->Clone(nullptr);
@@ -37,18 +36,18 @@ void CPDF_ImageCacheEntry::Reset(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap) {
}
static uint32_t FPDF_ImageCache_EstimateImageSize(
- const CFX_RetainPtr<CFX_DIBSource>& pDIB) {
+ const RetainPtr<CFX_DIBSource>& pDIB) {
return pDIB && pDIB->GetBuffer()
? (uint32_t)pDIB->GetHeight() * pDIB->GetPitch() +
(uint32_t)pDIB->GetPaletteSize() * 4
: 0;
}
-CFX_RetainPtr<CFX_DIBSource> CPDF_ImageCacheEntry::DetachBitmap() {
+RetainPtr<CFX_DIBSource> CPDF_ImageCacheEntry::DetachBitmap() {
return std::move(m_pCurBitmap);
}
-CFX_RetainPtr<CFX_DIBSource> CPDF_ImageCacheEntry::DetachMask() {
+RetainPtr<CFX_DIBSource> CPDF_ImageCacheEntry::DetachMask() {
return std::move(m_pCurMask);
}
diff --git a/core/fpdfapi/render/cpdf_imagecacheentry.h b/core/fpdfapi/render/cpdf_imagecacheentry.h
index 176b2818d9..111050f60c 100644
--- a/core/fpdfapi/render/cpdf_imagecacheentry.h
+++ b/core/fpdfapi/render/cpdf_imagecacheentry.h
@@ -9,9 +9,9 @@
#include <memory>
-#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"
class CFX_DIBSource;
class CFX_DIBitmap;
@@ -24,10 +24,10 @@ class IFX_PauseIndicator;
class CPDF_ImageCacheEntry {
public:
CPDF_ImageCacheEntry(CPDF_Document* pDoc,
- const CFX_RetainPtr<CPDF_Image>& pImage);
+ const RetainPtr<CPDF_Image>& pImage);
~CPDF_ImageCacheEntry();
- void Reset(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap);
+ void Reset(const RetainPtr<CFX_DIBitmap>& pBitmap);
uint32_t EstimateSize() const { return m_dwCacheSize; }
uint32_t GetTimeCount() const { return m_dwTimeCount; }
CPDF_Image* GetImage() const { return m_pImage.Get(); }
@@ -38,8 +38,8 @@ class CPDF_ImageCacheEntry {
bool bLoadMask,
CPDF_RenderStatus* pRenderStatus);
int Continue(IFX_PauseIndicator* pPause, CPDF_RenderStatus* pRenderStatus);
- CFX_RetainPtr<CFX_DIBSource> DetachBitmap();
- CFX_RetainPtr<CFX_DIBSource> DetachMask();
+ RetainPtr<CFX_DIBSource> DetachBitmap();
+ RetainPtr<CFX_DIBSource> DetachMask();
int m_dwTimeCount;
uint32_t m_MatteColor;
@@ -49,11 +49,11 @@ class CPDF_ImageCacheEntry {
void CalcSize();
CFX_UnownedPtr<CPDF_Document> const m_pDocument;
- CFX_RetainPtr<CPDF_Image> const m_pImage;
- CFX_RetainPtr<CFX_DIBSource> m_pCurBitmap;
- CFX_RetainPtr<CFX_DIBSource> m_pCurMask;
- CFX_RetainPtr<CFX_DIBSource> m_pCachedBitmap;
- CFX_RetainPtr<CFX_DIBSource> m_pCachedMask;
+ RetainPtr<CPDF_Image> const m_pImage;
+ RetainPtr<CFX_DIBSource> m_pCurBitmap;
+ RetainPtr<CFX_DIBSource> m_pCurMask;
+ RetainPtr<CFX_DIBSource> m_pCachedBitmap;
+ RetainPtr<CFX_DIBSource> m_pCachedMask;
uint32_t m_dwCacheSize;
};
diff --git a/core/fpdfapi/render/cpdf_imageloader.cpp b/core/fpdfapi/render/cpdf_imageloader.cpp
index f195b89dfc..19eb875946 100644
--- a/core/fpdfapi/render/cpdf_imageloader.cpp
+++ b/core/fpdfapi/render/cpdf_imageloader.cpp
@@ -61,7 +61,7 @@ void CPDF_ImageLoader::HandleFailure() {
m_MatteColor = entry->m_MatteColor;
return;
}
- CFX_RetainPtr<CPDF_Image> pImage = m_pImageObject->GetImage();
+ RetainPtr<CPDF_Image> pImage = m_pImageObject->GetImage();
m_bCached = false;
m_pBitmap = pImage->DetachBitmap();
m_pMask = pImage->DetachMask();
diff --git a/core/fpdfapi/render/cpdf_imageloader.h b/core/fpdfapi/render/cpdf_imageloader.h
index 69577c3a18..2fc0670dff 100644
--- a/core/fpdfapi/render/cpdf_imageloader.h
+++ b/core/fpdfapi/render/cpdf_imageloader.h
@@ -9,8 +9,8 @@
#include <memory>
-#include "core/fxcrt/cfx_retain_ptr.h"
#include "core/fxcrt/cfx_unowned_ptr.h"
+#include "core/fxcrt/retain_ptr.h"
#include "core/fxge/fx_dib.h"
class CPDF_ImageObject;
@@ -31,8 +31,8 @@ class CPDF_ImageLoader {
CPDF_RenderStatus* pRenderStatus);
bool Continue(IFX_PauseIndicator* pPause, CPDF_RenderStatus* pRenderStatus);
- CFX_RetainPtr<CFX_DIBSource> m_pBitmap;
- CFX_RetainPtr<CFX_DIBSource> m_pMask;
+ RetainPtr<CFX_DIBSource> m_pBitmap;
+ RetainPtr<CFX_DIBSource> m_pMask;
uint32_t m_MatteColor;
bool m_bCached;
diff --git a/core/fpdfapi/render/cpdf_imagerenderer.cpp b/core/fpdfapi/render/cpdf_imagerenderer.cpp
index e9f1752d57..2fa0beba47 100644
--- a/core/fpdfapi/render/cpdf_imagerenderer.cpp
+++ b/core/fpdfapi/render/cpdf_imagerenderer.cpp
@@ -184,7 +184,7 @@ bool CPDF_ImageRenderer::Start(CPDF_RenderStatus* pStatus,
}
bool CPDF_ImageRenderer::Start(CPDF_RenderStatus* pStatus,
- const CFX_RetainPtr<CFX_DIBSource>& pDIBSource,
+ const RetainPtr<CFX_DIBSource>& pDIBSource,
FX_ARGB bitmap_argb,
int bitmap_alpha,
const CFX_Matrix* pImage2Device,
@@ -222,7 +222,7 @@ CFX_Matrix CPDF_ImageRenderer::GetDrawMatrix(const FX_RECT& rect) const {
void CPDF_ImageRenderer::CalculateDrawImage(
CFX_DefaultRenderDevice* pBitmapDevice1,
CFX_DefaultRenderDevice* pBitmapDevice2,
- const CFX_RetainPtr<CFX_DIBSource>& pDIBSource,
+ const RetainPtr<CFX_DIBSource>& pDIBSource,
CFX_Matrix* pNewMatrix,
const FX_RECT& rect) const {
CPDF_RenderStatus bitmap_render;
@@ -380,7 +380,7 @@ bool CPDF_ImageRenderer::StartDIBSource() {
}
}
#ifdef _SKIA_SUPPORT_
- CFX_RetainPtr<CFX_DIBitmap> premultiplied = m_pDIBSource->Clone(nullptr);
+ RetainPtr<CFX_DIBitmap> premultiplied = m_pDIBSource->Clone(nullptr);
if (m_pDIBSource->HasAlpha())
CFX_SkiaDeviceDriver::PreMultiply(premultiplied);
if (m_pRenderStatus->m_pDevice->StartDIBitsWithBlend(
@@ -456,7 +456,7 @@ bool CPDF_ImageRenderer::StartDIBSource() {
FX_RECT dest_clip(
dest_rect.left - image_rect.left, dest_rect.top - image_rect.top,
dest_rect.right - image_rect.left, dest_rect.bottom - image_rect.top);
- CFX_RetainPtr<CFX_DIBitmap> pStretched =
+ RetainPtr<CFX_DIBitmap> pStretched =
m_pDIBSource->StretchTo(dest_width, dest_height, m_Flags, &dest_clip);
if (pStretched) {
m_pRenderStatus->CompositeDIBitmap(pStretched, dest_rect.left,
@@ -477,7 +477,7 @@ bool CPDF_ImageRenderer::StartBitmapAlpha() {
FXFILL_WINDING);
return false;
}
- CFX_RetainPtr<CFX_DIBSource> pAlphaMask;
+ RetainPtr<CFX_DIBSource> pAlphaMask;
if (m_pDIBSource->IsAlphaMask())
pAlphaMask = m_pDIBSource;
else
@@ -486,7 +486,7 @@ bool CPDF_ImageRenderer::StartBitmapAlpha() {
if (fabs(m_ImageMatrix.b) >= 0.5f || fabs(m_ImageMatrix.c) >= 0.5f) {
int left;
int top;
- CFX_RetainPtr<CFX_DIBitmap> pTransformed =
+ RetainPtr<CFX_DIBitmap> pTransformed =
pAlphaMask->TransformTo(&m_ImageMatrix, &left, &top);
if (!pTransformed)
return true;
@@ -515,7 +515,7 @@ bool CPDF_ImageRenderer::Continue(IFX_PauseIndicator* pPause) {
if (m_pTransformer->Continue(pPause))
return true;
- CFX_RetainPtr<CFX_DIBitmap> pBitmap = m_pTransformer->DetachBitmap();
+ RetainPtr<CFX_DIBitmap> pBitmap = m_pTransformer->DetachBitmap();
if (!pBitmap)
return false;
diff --git a/core/fpdfapi/render/cpdf_imagerenderer.h b/core/fpdfapi/render/cpdf_imagerenderer.h
index 332cbf515c..0d59a4e7cb 100644
--- a/core/fpdfapi/render/cpdf_imagerenderer.h
+++ b/core/fpdfapi/render/cpdf_imagerenderer.h
@@ -35,7 +35,7 @@ class CPDF_ImageRenderer {
int blendType);
bool Start(CPDF_RenderStatus* pStatus,
- const CFX_RetainPtr<CFX_DIBSource>& pDIBSource,
+ const RetainPtr<CFX_DIBSource>& pDIBSource,
FX_ARGB bitmap_argb,
int bitmap_alpha,
const CFX_Matrix* pImage2Device,
@@ -58,7 +58,7 @@ class CPDF_ImageRenderer {
CFX_Matrix GetDrawMatrix(const FX_RECT& rect) const;
void CalculateDrawImage(CFX_DefaultRenderDevice* bitmap_device1,
CFX_DefaultRenderDevice* bitmap_device2,
- const CFX_RetainPtr<CFX_DIBSource>& pDIBSource,
+ const RetainPtr<CFX_DIBSource>& pDIBSource,
CFX_Matrix* pNewMatrix,
const FX_RECT& rect) const;
void HandleFilters();
@@ -69,8 +69,8 @@ class CPDF_ImageRenderer {
CFX_UnownedPtr<const CFX_Matrix> m_pObj2Device;
CFX_Matrix m_ImageMatrix;
CPDF_ImageLoader m_Loader;
- CFX_RetainPtr<CFX_DIBSource> m_pDIBSource;
- CFX_RetainPtr<CFX_DIBitmap> m_pClone;
+ RetainPtr<CFX_DIBSource> m_pDIBSource;
+ RetainPtr<CFX_DIBitmap> m_pClone;
int m_BitmapAlpha;
bool m_bPatternColor;
CFX_UnownedPtr<CPDF_Pattern> m_pPattern;
diff --git a/core/fpdfapi/render/cpdf_pagerendercache.cpp b/core/fpdfapi/render/cpdf_pagerendercache.cpp
index ca5b620316..42205ebe63 100644
--- a/core/fpdfapi/render/cpdf_pagerendercache.cpp
+++ b/core/fpdfapi/render/cpdf_pagerendercache.cpp
@@ -80,7 +80,7 @@ void CPDF_PageRenderCache::ClearImageCacheEntry(CPDF_Stream* pStream) {
}
bool CPDF_PageRenderCache::StartGetCachedBitmap(
- const CFX_RetainPtr<CPDF_Image>& pImage,
+ const RetainPtr<CPDF_Image>& pImage,
bool bStdCS,
uint32_t GroupFamily,
bool bLoadMask,
@@ -126,9 +126,8 @@ bool CPDF_PageRenderCache::Continue(IFX_PauseIndicator* pPause,
return false;
}
-void CPDF_PageRenderCache::ResetBitmap(
- const CFX_RetainPtr<CPDF_Image>& pImage,
- const CFX_RetainPtr<CFX_DIBitmap>& pBitmap) {
+void CPDF_PageRenderCache::ResetBitmap(const RetainPtr<CPDF_Image>& pImage,
+ const RetainPtr<CFX_DIBitmap>& pBitmap) {
CPDF_ImageCacheEntry* pEntry;
CPDF_Stream* pStream = pImage->GetStream();
const auto it = m_ImageCache.find(pStream);
diff --git a/core/fpdfapi/render/cpdf_pagerendercache.h b/core/fpdfapi/render/cpdf_pagerendercache.h
index 0a315b74ed..76898ab258 100644
--- a/core/fpdfapi/render/cpdf_pagerendercache.h
+++ b/core/fpdfapi/render/cpdf_pagerendercache.h
@@ -9,9 +9,9 @@
#include <map>
-#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"
class CFX_DIBitmap;
class CPDF_Image;
@@ -28,14 +28,14 @@ class CPDF_PageRenderCache {
void CacheOptimization(int32_t dwLimitCacheSize);
uint32_t GetTimeCount() const { return m_nTimeCount; }
- void ResetBitmap(const CFX_RetainPtr<CPDF_Image>& pImage,
- const CFX_RetainPtr<CFX_DIBitmap>& pBitmap);
+ void ResetBitmap(const RetainPtr<CPDF_Image>& pImage,
+ const RetainPtr<CFX_DIBitmap>& pBitmap);
CPDF_Page* GetPage() const { return m_pPage.Get(); }
CPDF_ImageCacheEntry* GetCurImageCacheEntry() const {
return m_pCurImageCacheEntry;
}
- bool StartGetCachedBitmap(const CFX_RetainPtr<CPDF_Image>& pImage,
+ bool StartGetCachedBitmap(const RetainPtr<CPDF_Image>& pImage,
bool bStdCS,
uint32_t GroupFamily,
bool bLoadMask,
diff --git a/core/fpdfapi/render/cpdf_rendercontext.cpp b/core/fpdfapi/render/cpdf_rendercontext.cpp
index dec513276d..3c08295480 100644
--- a/core/fpdfapi/render/cpdf_rendercontext.cpp
+++ b/core/fpdfapi/render/cpdf_rendercontext.cpp
@@ -30,11 +30,10 @@ CPDF_RenderContext::CPDF_RenderContext(CPDF_Document* pDoc,
CPDF_RenderContext::~CPDF_RenderContext() {}
-void CPDF_RenderContext::GetBackground(
- const CFX_RetainPtr<CFX_DIBitmap>& pBuffer,
- const CPDF_PageObject* pObj,
- const CPDF_RenderOptions* pOptions,
- CFX_Matrix* pFinalMatrix) {
+void CPDF_RenderContext::GetBackground(const RetainPtr<CFX_DIBitmap>& pBuffer,
+ const CPDF_PageObject* pObj,
+ const CPDF_RenderOptions* pOptions,
+ CFX_Matrix* pFinalMatrix) {
CFX_DefaultRenderDevice device;
device.Attach(pBuffer, false, nullptr, false);
diff --git a/core/fpdfapi/render/cpdf_rendercontext.h b/core/fpdfapi/render/cpdf_rendercontext.h
index feb71871b1..8806a78622 100644
--- a/core/fpdfapi/render/cpdf_rendercontext.h
+++ b/core/fpdfapi/render/cpdf_rendercontext.h
@@ -9,9 +9,9 @@
#include <vector>
-#include "core/fxcrt/cfx_retain_ptr.h"
#include "core/fxcrt/cfx_unowned_ptr.h"
#include "core/fxcrt/fx_coordinates.h"
+#include "core/fxcrt/retain_ptr.h"
class CPDF_Dictionary;
class CPDF_Document;
@@ -52,7 +52,7 @@ class CPDF_RenderContext {
const CPDF_RenderOptions* pOptions,
const CFX_Matrix* pFinalMatrix);
- void GetBackground(const CFX_RetainPtr<CFX_DIBitmap>& pBuffer,
+ void GetBackground(const RetainPtr<CFX_DIBitmap>& pBuffer,
const CPDF_PageObject* pObj,
const CPDF_RenderOptions* pOptions,
CFX_Matrix* pFinalMatrix);
diff --git a/core/fpdfapi/render/cpdf_renderoptions.h b/core/fpdfapi/render/cpdf_renderoptions.h
index aa48b4e5dc..1f6afc30e2 100644
--- a/core/fpdfapi/render/cpdf_renderoptions.h
+++ b/core/fpdfapi/render/cpdf_renderoptions.h
@@ -8,8 +8,8 @@
#define CORE_FPDFAPI_RENDER_CPDF_RENDEROPTIONS_H_
#include "core/fpdfdoc/cpdf_occontext.h"
-#include "core/fxcrt/cfx_retain_ptr.h"
#include "core/fxcrt/fx_system.h"
+#include "core/fxcrt/retain_ptr.h"
#include "core/fxge/fx_dib.h"
#define RENDER_CLEARTYPE 0x00000001
@@ -44,7 +44,7 @@ class CPDF_RenderOptions {
uint32_t m_Flags;
uint32_t m_dwLimitCacheSize;
bool m_bDrawAnnots;
- CFX_RetainPtr<CPDF_OCContext> m_pOCContext;
+ RetainPtr<CPDF_OCContext> m_pOCContext;
};
#endif // CORE_FPDFAPI_RENDER_CPDF_RENDEROPTIONS_H_
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index ef07852e38..e94913d9aa 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -100,7 +100,7 @@ uint32_t CountOutputs(
return total;
}
-void DrawAxialShading(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
+void DrawAxialShading(const RetainPtr<CFX_DIBitmap>& pBitmap,
CFX_Matrix* pObject2Bitmap,
CPDF_Dictionary* pDict,
const std::vector<std::unique_ptr<CPDF_Function>>& funcs,
@@ -185,7 +185,7 @@ void DrawAxialShading(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
}
}
-void DrawRadialShading(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
+void DrawRadialShading(const RetainPtr<CFX_DIBitmap>& pBitmap,
CFX_Matrix* pObject2Bitmap,
CPDF_Dictionary* pDict,
const std::vector<std::unique_ptr<CPDF_Function>>& funcs,
@@ -317,7 +317,7 @@ void DrawRadialShading(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
}
}
-void DrawFuncShading(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
+void DrawFuncShading(const RetainPtr<CFX_DIBitmap>& pBitmap,
CFX_Matrix* pObject2Bitmap,
CPDF_Dictionary* pDict,
const std::vector<std::unique_ptr<CPDF_Function>>& funcs,
@@ -388,7 +388,7 @@ bool GetScanlineIntersect(int y,
return true;
}
-void DrawGouraud(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
+void DrawGouraud(const RetainPtr<CFX_DIBitmap>& pBitmap,
int alpha,
CPDF_MeshVertex triangle[3]) {
float min_y = triangle[0].position.y;
@@ -470,7 +470,7 @@ void DrawGouraud(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
}
void DrawFreeGouraudShading(
- const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
+ const RetainPtr<CFX_DIBitmap>& pBitmap,
CFX_Matrix* pObject2Bitmap,
CPDF_Stream* pShadingStream,
const std::vector<std::unique_ptr<CPDF_Function>>& funcs,
@@ -511,7 +511,7 @@ void DrawFreeGouraudShading(
}
void DrawLatticeGouraudShading(
- const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
+ const RetainPtr<CFX_DIBitmap>& pBitmap,
CFX_Matrix* pObject2Bitmap,
CPDF_Stream* pShadingStream,
const std::vector<std::unique_ptr<CPDF_Function>>& funcs,
@@ -827,7 +827,7 @@ struct CPDF_PatchDrawer {
void DrawCoonPatchMeshes(
ShadingType type,
- const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
+ const RetainPtr<CFX_DIBitmap>& pBitmap,
CFX_Matrix* pObject2Bitmap,
CPDF_Stream* pShadingStream,
const std::vector<std::unique_ptr<CPDF_Function>>& funcs,
@@ -911,13 +911,13 @@ void DrawCoonPatchMeshes(
}
}
-CFX_RetainPtr<CFX_DIBitmap> DrawPatternBitmap(CPDF_Document* pDoc,
- CPDF_PageRenderCache* pCache,
- CPDF_TilingPattern* pPattern,
- const CFX_Matrix* pObject2Device,
- int width,
- int height,
- int flags) {
+RetainPtr<CFX_DIBitmap> DrawPatternBitmap(CPDF_Document* pDoc,
+ CPDF_PageRenderCache* pCache,
+ CPDF_TilingPattern* pPattern,
+ const CFX_Matrix* pObject2Device,
+ int width,
+ int height,
+ int flags) {
auto pBitmap = pdfium::MakeRetain<CFX_DIBitmap>();
if (!pBitmap->Create(width, height,
pPattern->colored() ? FXDIB_Argb : FXDIB_8bppMask)) {
@@ -1319,7 +1319,7 @@ bool CPDF_RenderStatus::ProcessPath(CPDF_PathObject* pPathObj,
fill_argb, stroke_argb, FillType, m_curBlend);
}
-CFX_RetainPtr<CPDF_TransferFunc> CPDF_RenderStatus::GetTransferFunc(
+RetainPtr<CPDF_TransferFunc> CPDF_RenderStatus::GetTransferFunc(
CPDF_Object* pObj) const {
ASSERT(pObj);
CPDF_DocRenderData* pDocCache = m_pContext->GetDocument()->GetRenderData();
@@ -1557,7 +1557,7 @@ bool CPDF_RenderStatus::ProcessTransparency(CPDF_PageObject* pPageObj,
int width = FXSYS_round((float)rect.Width() * scaleX);
int height = FXSYS_round((float)rect.Height() * scaleY);
CFX_DefaultRenderDevice bitmap_device;
- CFX_RetainPtr<CFX_DIBitmap> oriDevice;
+ RetainPtr<CFX_DIBitmap> oriDevice;
if (!isolated && (m_pDevice->GetRenderCaps() & FXRC_GET_BITS)) {
oriDevice = pdfium::MakeRetain<CFX_DIBitmap>();
if (!m_pDevice->CreateCompatibleBitmap(oriDevice, width, height))
@@ -1567,14 +1567,14 @@ bool CPDF_RenderStatus::ProcessTransparency(CPDF_PageObject* pPageObj,
if (!bitmap_device.Create(width, height, FXDIB_Argb, oriDevice))
return true;
- CFX_RetainPtr<CFX_DIBitmap> bitmap = bitmap_device.GetBitmap();
+ RetainPtr<CFX_DIBitmap> bitmap = bitmap_device.GetBitmap();
bitmap->Clear(0);
CFX_Matrix new_matrix = *pObj2Device;
new_matrix.Translate(-rect.left, -rect.top);
new_matrix.Scale(scaleX, scaleY);
- CFX_RetainPtr<CFX_DIBitmap> pTextMask;
+ RetainPtr<CFX_DIBitmap> pTextMask;
if (bTextClip) {
pTextMask = pdfium::MakeRetain<CFX_DIBitmap>();
if (!pTextMask->Create(width, height, FXDIB_8bppMask))
@@ -1609,7 +1609,7 @@ bool CPDF_RenderStatus::ProcessTransparency(CPDF_PageObject* pPageObj,
if (pSMaskDict) {
CFX_Matrix smask_matrix = *pPageObj->m_GeneralState.GetSMaskMatrix();
smask_matrix.Concat(*pObj2Device);
- CFX_RetainPtr<CFX_DIBSource> pSMaskSource =
+ RetainPtr<CFX_DIBSource> pSMaskSource =
LoadSMask(pSMaskDict, &rect, &smask_matrix);
if (pSMaskSource)
bitmap->MultiplyAlpha(pSMaskSource);
@@ -1638,7 +1638,7 @@ bool CPDF_RenderStatus::ProcessTransparency(CPDF_PageObject* pPageObj,
return true;
}
-CFX_RetainPtr<CFX_DIBitmap> CPDF_RenderStatus::GetBackdrop(
+RetainPtr<CFX_DIBitmap> CPDF_RenderStatus::GetBackdrop(
const CPDF_PageObject* pObj,
const FX_RECT& rect,
int& left,
@@ -1815,7 +1815,7 @@ bool CPDF_RenderStatus::ProcessText(CPDF_TextObject* textobj,
&text_matrix, fill_argb, &m_Options);
}
-CFX_RetainPtr<CPDF_Type3Cache> CPDF_RenderStatus::GetCachedType3(
+RetainPtr<CPDF_Type3Cache> CPDF_RenderStatus::GetCachedType3(
CPDF_Type3Font* pFont) {
CPDF_Document* pDoc = pFont->GetDocument();
if (!pDoc)
@@ -1923,7 +1923,7 @@ bool CPDF_RenderStatus::ProcessType3Text(CPDF_TextObject* textobj,
}
} else if (pType3Char->m_pBitmap) {
if (device_class == FXDC_DISPLAY) {
- CFX_RetainPtr<CPDF_Type3Cache> pCache = GetCachedType3(pType3Font);
+ RetainPtr<CPDF_Type3Cache> pCache = GetCachedType3(pType3Font);
refTypeCache.m_dwCount++;
CFX_GlyphBitmap* pBitmap = pCache->LoadGlyph(charcode, &matrix, sa, sd);
if (!pBitmap)
@@ -2086,7 +2086,7 @@ void CPDF_RenderStatus::DrawShading(CPDF_ShadingPattern* pPattern,
buffer.Initialize(m_pContext.Get(), m_pDevice, &clip_rect, m_pCurObj, 150);
CFX_Matrix FinalMatrix = *pMatrix;
FinalMatrix.Concat(*buffer.GetMatrix());
- CFX_RetainPtr<CFX_DIBitmap> pBitmap = buffer.GetBitmap();
+ RetainPtr<CFX_DIBitmap> pBitmap = buffer.GetBitmap();
if (!pBitmap->GetBuffer())
return;
@@ -2290,9 +2290,9 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern,
}
float left_offset = cell_bbox.left - mtPattern2Device.e;
float top_offset = cell_bbox.bottom - mtPattern2Device.f;
- CFX_RetainPtr<CFX_DIBitmap> pPatternBitmap;
+ RetainPtr<CFX_DIBitmap> pPatternBitmap;
if (width * height < 16) {
- CFX_RetainPtr<CFX_DIBitmap> pEnlargedBitmap =
+ RetainPtr<CFX_DIBitmap> pEnlargedBitmap =
DrawPatternBitmap(m_pContext->GetDocument(), m_pContext->GetPageCache(),
pPattern, pObj2Device, 8, 8, m_Options.m_Flags);
pPatternBitmap = pEnlargedBitmap->StretchTo(width, height, 0, nullptr);
@@ -2409,7 +2409,7 @@ bool CPDF_RenderStatus::ProcessImage(CPDF_ImageObject* pImageObj,
}
void CPDF_RenderStatus::CompositeDIBitmap(
- const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap,
+ const RetainPtr<CFX_DIBitmap>& pDIBitmap,
int left,
int top,
FX_ARGB mask_argb,
@@ -2466,10 +2466,10 @@ void CPDF_RenderStatus::CompositeDIBitmap(
FX_RECT rect(left, top, left + pDIBitmap->GetWidth(),
top + pDIBitmap->GetHeight());
rect.Intersect(m_pDevice->GetClipBox());
- CFX_RetainPtr<CFX_DIBitmap> pClone;
+ RetainPtr<CFX_DIBitmap> pClone;
if (m_pDevice->GetBackDrop() && m_pDevice->GetBitmap()) {
pClone = m_pDevice->GetBackDrop()->Clone(&rect);
- CFX_RetainPtr<CFX_DIBitmap> pForeBitmap = m_pDevice->GetBitmap();
+ RetainPtr<CFX_DIBitmap> pForeBitmap = m_pDevice->GetBitmap();
pClone->CompositeBitmap(0, 0, pClone->GetWidth(), pClone->GetHeight(),
pForeBitmap, rect.left, rect.top);
left = left >= 0 ? 0 : left;
@@ -2497,7 +2497,7 @@ void CPDF_RenderStatus::CompositeDIBitmap(
int back_left, back_top;
FX_RECT rect(left, top, left + pDIBitmap->GetWidth(),
top + pDIBitmap->GetHeight());
- CFX_RetainPtr<CFX_DIBitmap> pBackdrop =
+ RetainPtr<CFX_DIBitmap> pBackdrop =
GetBackdrop(m_pCurObj, rect, back_left, back_top,
blend_mode > FXDIB_BLEND_NORMAL && bIsolated);
if (!pBackdrop)
@@ -2523,7 +2523,7 @@ void CPDF_RenderStatus::CompositeDIBitmap(
m_pDevice->SetDIBits(pBackdrop, back_left, back_top);
}
-CFX_RetainPtr<CFX_DIBitmap> CPDF_RenderStatus::LoadSMask(
+RetainPtr<CFX_DIBitmap> CPDF_RenderStatus::LoadSMask(
CPDF_Dictionary* pSMaskDict,
FX_RECT* pClipRect,
const CFX_Matrix* pMatrix) {
diff --git a/core/fpdfapi/render/cpdf_renderstatus.h b/core/fpdfapi/render/cpdf_renderstatus.h
index b4872f1d1e..b823834e7d 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.h
+++ b/core/fpdfapi/render/cpdf_renderstatus.h
@@ -107,7 +107,7 @@ class CPDF_RenderStatus {
const CFX_Matrix* pObj2Device,
bool bStroke);
bool ProcessImage(CPDF_ImageObject* pImageObj, const CFX_Matrix* pObj2Device);
- void CompositeDIBitmap(const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap,
+ void CompositeDIBitmap(const RetainPtr<CFX_DIBitmap>& pDIBitmap,
int left,
int top,
FX_ARGB mask_argb,
@@ -135,19 +135,19 @@ class CPDF_RenderStatus {
bool bStroke);
bool ProcessForm(const CPDF_FormObject* pFormObj,
const CFX_Matrix* pObj2Device);
- CFX_RetainPtr<CFX_DIBitmap> GetBackdrop(const CPDF_PageObject* pObj,
- const FX_RECT& rect,
- int& left,
- int& top,
- bool bBackAlphaRequired);
- CFX_RetainPtr<CFX_DIBitmap> LoadSMask(CPDF_Dictionary* pSMaskDict,
- FX_RECT* pClipRect,
- const CFX_Matrix* pMatrix);
- static CFX_RetainPtr<CPDF_Type3Cache> GetCachedType3(CPDF_Type3Font* pFont);
+ RetainPtr<CFX_DIBitmap> GetBackdrop(const CPDF_PageObject* pObj,
+ const FX_RECT& rect,
+ int& left,
+ int& top,
+ bool bBackAlphaRequired);
+ RetainPtr<CFX_DIBitmap> LoadSMask(CPDF_Dictionary* pSMaskDict,
+ FX_RECT* pClipRect,
+ const CFX_Matrix* pMatrix);
+ static RetainPtr<CPDF_Type3Cache> GetCachedType3(CPDF_Type3Font* pFont);
static std::unique_ptr<CPDF_GraphicStates> CloneObjStates(
const CPDF_GraphicStates* pPathObj,
bool bStroke);
- CFX_RetainPtr<CPDF_TransferFunc> GetTransferFunc(CPDF_Object* pObject) const;
+ RetainPtr<CPDF_TransferFunc> GetTransferFunc(CPDF_Object* pObject) const;
FX_ARGB GetFillArgb(CPDF_PageObject* pObj, bool bType3 = false) const;
FX_ARGB GetStrokeArgb(CPDF_PageObject* pObj) const;
bool GetObjectClippedRect(const CPDF_PageObject* pObj,
diff --git a/core/fpdfapi/render/cpdf_transferfunc.cpp b/core/fpdfapi/render/cpdf_transferfunc.cpp
index e9ea0576ae..98528c3c14 100644
--- a/core/fpdfapi/render/cpdf_transferfunc.cpp
+++ b/core/fpdfapi/render/cpdf_transferfunc.cpp
@@ -20,9 +20,9 @@ FX_COLORREF CPDF_TransferFunc::TranslateColor(FX_COLORREF rgb) const {
m_Samples[512 + FXSYS_GetBValue(rgb)]);
}
-CFX_RetainPtr<CFX_DIBSource> CPDF_TransferFunc::TranslateImage(
- const CFX_RetainPtr<CFX_DIBSource>& pSrc) {
- CFX_RetainPtr<CPDF_TransferFunc> pHolder(this);
+RetainPtr<CFX_DIBSource> CPDF_TransferFunc::TranslateImage(
+ const RetainPtr<CFX_DIBSource>& pSrc) {
+ RetainPtr<CPDF_TransferFunc> pHolder(this);
auto pDest = pdfium::MakeRetain<CPDF_DIBTransferFunc>(pHolder);
pDest->LoadSrc(pSrc);
return pDest;
diff --git a/core/fpdfapi/render/cpdf_transferfunc.h b/core/fpdfapi/render/cpdf_transferfunc.h
index ad7bf28c2f..32811891ea 100644
--- a/core/fpdfapi/render/cpdf_transferfunc.h
+++ b/core/fpdfapi/render/cpdf_transferfunc.h
@@ -7,21 +7,20 @@
#ifndef CORE_FPDFAPI_RENDER_CPDF_TRANSFERFUNC_H_
#define CORE_FPDFAPI_RENDER_CPDF_TRANSFERFUNC_H_
-#include "core/fxcrt/cfx_retain_ptr.h"
#include "core/fxcrt/cfx_unowned_ptr.h"
+#include "core/fxcrt/retain_ptr.h"
#include "core/fxge/fx_dib.h"
class CPDF_Document;
class CFX_DIBSource;
-class CPDF_TransferFunc : public CFX_Retainable {
+class CPDF_TransferFunc : public Retainable {
public:
template <typename T, typename... Args>
- friend CFX_RetainPtr<T> pdfium::MakeRetain(Args&&... args);
+ friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
FX_COLORREF TranslateColor(FX_COLORREF src) const;
- CFX_RetainPtr<CFX_DIBSource> TranslateImage(
- const CFX_RetainPtr<CFX_DIBSource>& pSrc);
+ RetainPtr<CFX_DIBSource> TranslateImage(const RetainPtr<CFX_DIBSource>& pSrc);
CFX_UnownedPtr<CPDF_Document> const m_pPDFDoc;
bool m_bIdentity;
diff --git a/core/fpdfapi/render/cpdf_type3cache.cpp b/core/fpdfapi/render/cpdf_type3cache.cpp
index b87b5ef74a..42b11605c5 100644
--- a/core/fpdfapi/render/cpdf_type3cache.cpp
+++ b/core/fpdfapi/render/cpdf_type3cache.cpp
@@ -53,8 +53,7 @@ bool IsScanLine8bpp(uint8_t* pBuf, int width) {
return false;
}
-int DetectFirstLastScan(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
- bool bFirst) {
+int DetectFirstLastScan(const RetainPtr<CFX_DIBitmap>& pBitmap, bool bFirst) {
int height = pBitmap->GetHeight();
int pitch = pBitmap->GetPitch();
int width = pBitmap->GetWidth();
@@ -123,12 +122,12 @@ std::unique_ptr<CFX_GlyphBitmap> CPDF_Type3Cache::RenderGlyph(
if (!pChar || !pChar->m_pBitmap)
return nullptr;
- CFX_RetainPtr<CFX_DIBitmap> pBitmap = pChar->m_pBitmap;
+ RetainPtr<CFX_DIBitmap> pBitmap = pChar->m_pBitmap;
CFX_Matrix image_matrix = pChar->m_ImageMatrix;
CFX_Matrix text_matrix(pMatrix->a, pMatrix->b, pMatrix->c, pMatrix->d, 0, 0);
image_matrix.Concat(text_matrix);
- CFX_RetainPtr<CFX_DIBitmap> pResBitmap;
+ RetainPtr<CFX_DIBitmap> pResBitmap;
int left = 0;
int top = 0;
if (fabs(image_matrix.b) < fabs(image_matrix.a) / 100 &&
diff --git a/core/fpdfapi/render/cpdf_type3cache.h b/core/fpdfapi/render/cpdf_type3cache.h
index ab748ba989..fe681bbc99 100644
--- a/core/fpdfapi/render/cpdf_type3cache.h
+++ b/core/fpdfapi/render/cpdf_type3cache.h
@@ -11,17 +11,17 @@
#include <memory>
#include "core/fpdfapi/font/cpdf_type3font.h"
-#include "core/fxcrt/cfx_retain_ptr.h"
#include "core/fxcrt/fx_coordinates.h"
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"
+#include "core/fxcrt/retain_ptr.h"
class CPDF_Type3Glyphs;
-class CPDF_Type3Cache : public CFX_Retainable {
+class CPDF_Type3Cache : public Retainable {
public:
template <typename T, typename... Args>
- friend CFX_RetainPtr<T> pdfium::MakeRetain(Args&&... args);
+ friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
CFX_GlyphBitmap* LoadGlyph(uint32_t charcode,
const CFX_Matrix* pMatrix,