summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-05 10:27:45 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-05 17:04:57 +0000
commit4ce4f5f8ab0b25ac10a5c66cac1a8c281e24a69b (patch)
tree7853cdd1e63d94c01b1893fef0722433400033a9 /core
parent645e78a1152b035fb83ac5bbe93715b54f11a1b6 (diff)
downloadpdfium-4ce4f5f8ab0b25ac10a5c66cac1a8c281e24a69b.tar.xz
Cleanup CPDF_RenderStatus
This CL removes friend classes and moves public members to be private in the CPDF_RenderStatus class. Change-Id: Icdd6291bb8c1e5f43386d4a939b1eeaa16b8886d Reviewed-on: https://pdfium-review.googlesource.com/15530 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/fpdfapi/render/cpdf_imageloader.cpp4
-rw-r--r--core/fpdfapi/render/cpdf_imagerenderer.cpp84
-rw-r--r--core/fpdfapi/render/cpdf_pagerendercache.cpp4
-rw-r--r--core/fpdfapi/render/cpdf_progressiverenderer.cpp6
-rw-r--r--core/fpdfapi/render/cpdf_rendercontext.cpp8
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.h55
6 files changed, 87 insertions, 74 deletions
diff --git a/core/fpdfapi/render/cpdf_imageloader.cpp b/core/fpdfapi/render/cpdf_imageloader.cpp
index 19eb875946..08aa5f1784 100644
--- a/core/fpdfapi/render/cpdf_imageloader.cpp
+++ b/core/fpdfapi/render/cpdf_imageloader.cpp
@@ -35,8 +35,8 @@ bool CPDF_ImageLoader::Start(const CPDF_ImageObject* pImage,
GroupFamily, bLoadMask, pRenderStatus);
} else {
ret = m_pImageObject->GetImage()->StartLoadDIBSource(
- pRenderStatus->m_pFormResource.Get(),
- pRenderStatus->m_pPageResource.Get(), bStdCS, GroupFamily, bLoadMask);
+ pRenderStatus->GetFormResource(), pRenderStatus->GetPageResource(),
+ bStdCS, GroupFamily, bLoadMask);
}
if (!ret)
HandleFailure();
diff --git a/core/fpdfapi/render/cpdf_imagerenderer.cpp b/core/fpdfapi/render/cpdf_imagerenderer.cpp
index f2ddced6b1..d71bcf49e5 100644
--- a/core/fpdfapi/render/cpdf_imagerenderer.cpp
+++ b/core/fpdfapi/render/cpdf_imagerenderer.cpp
@@ -60,9 +60,9 @@ bool CPDF_ImageRenderer::StartLoadDIBSource() {
return false;
if (m_Loader.Start(m_pImageObject.Get(),
- m_pRenderStatus->m_pContext->GetPageCache(), m_bStdCS,
- m_pRenderStatus->m_GroupFamily,
- m_pRenderStatus->m_bLoadMask, m_pRenderStatus.Get())) {
+ m_pRenderStatus->GetContext()->GetPageCache(), m_bStdCS,
+ m_pRenderStatus->GetGroupFamily(),
+ m_pRenderStatus->GetLoadMask(), m_pRenderStatus.Get())) {
m_Status = 4;
return true;
}
@@ -76,7 +76,8 @@ bool CPDF_ImageRenderer::StartRenderDIBSource() {
CPDF_GeneralState& state = m_pImageObject->m_GeneralState;
m_BitmapAlpha = FXSYS_round(255 * state.GetFillAlpha());
m_pDIBSource = m_Loader.m_pBitmap;
- if (m_pRenderStatus->m_Options.m_ColorMode == CPDF_RenderOptions::kAlpha &&
+ if (m_pRenderStatus->GetRenderOptions()->m_ColorMode ==
+ CPDF_RenderOptions::kAlpha &&
!m_Loader.m_pMask) {
return StartBitmapAlpha();
}
@@ -103,22 +104,22 @@ bool CPDF_ImageRenderer::StartRenderDIBSource() {
m_bPatternColor = true;
}
m_FillArgb = m_pRenderStatus->GetFillArgb(m_pImageObject.Get());
- } else if (m_pRenderStatus->m_Options.m_ColorMode ==
+ } else if (m_pRenderStatus->GetRenderOptions()->m_ColorMode ==
CPDF_RenderOptions::kGray) {
m_pClone = m_pDIBSource->Clone(nullptr);
m_pClone->ConvertColorScale(0xffffff, 0);
m_pDIBSource = m_pClone;
}
m_Flags = 0;
- if (m_pRenderStatus->m_Options.m_Flags & RENDER_FORCE_DOWNSAMPLE)
+ if (m_pRenderStatus->GetRenderOptions()->m_Flags & RENDER_FORCE_DOWNSAMPLE)
m_Flags |= RENDER_FORCE_DOWNSAMPLE;
- else if (m_pRenderStatus->m_Options.m_Flags & RENDER_FORCE_HALFTONE)
+ else if (m_pRenderStatus->GetRenderOptions()->m_Flags & RENDER_FORCE_HALFTONE)
m_Flags |= RENDER_FORCE_HALFTONE;
- if (m_pRenderStatus->m_pDevice->GetDeviceClass() != FXDC_DISPLAY)
+ if (m_pRenderStatus->GetRenderDevice()->GetDeviceClass() != FXDC_DISPLAY)
HandleFilters();
- if (m_pRenderStatus->m_Options.m_Flags & RENDER_NOIMAGESMOOTH)
+ if (m_pRenderStatus->GetRenderOptions()->m_Flags & RENDER_NOIMAGESMOOTH)
m_Flags |= FXDIB_NOSMOOTH;
else if (m_pImageObject->GetImage()->IsInterpol())
m_Flags |= FXDIB_INTERPOL;
@@ -136,7 +137,7 @@ bool CPDF_ImageRenderer::StartRenderDIBSource() {
}
CPDF_Document* pDocument = nullptr;
CPDF_Page* pPage = nullptr;
- if (auto* pPageCache = m_pRenderStatus->m_pContext->GetPageCache()) {
+ if (auto* pPageCache = m_pRenderStatus->GetContext()->GetPageCache()) {
pPage = pPageCache->GetPage();
pDocument = pPage->m_pDocument.Get();
} else {
@@ -172,8 +173,9 @@ bool CPDF_ImageRenderer::Start(CPDF_RenderStatus* pStatus,
m_BlendType = blendType;
m_pObj2Device = pObj2Device;
CPDF_Dictionary* pOC = m_pImageObject->GetImage()->GetOC();
- if (pOC && m_pRenderStatus->m_Options.m_pOCContext &&
- !m_pRenderStatus->m_Options.m_pOCContext->CheckOCGVisible(pOC)) {
+ if (pOC && m_pRenderStatus->GetRenderOptions()->m_pOCContext &&
+ !m_pRenderStatus->GetRenderOptions()->m_pOCContext->CheckOCGVisible(
+ pOC)) {
return false;
}
m_ImageMatrix = m_pImageObject->matrix();
@@ -203,13 +205,14 @@ bool CPDF_ImageRenderer::Start(CPDF_RenderStatus* pStatus,
}
bool CPDF_ImageRenderer::NotDrawing() const {
- return m_pRenderStatus->m_bPrint &&
- !(m_pRenderStatus->m_pDevice->GetRenderCaps() & FXRC_BLEND_MODE);
+ return m_pRenderStatus->IsPrint() &&
+ !(m_pRenderStatus->GetRenderDevice()->GetRenderCaps() &
+ FXRC_BLEND_MODE);
}
FX_RECT CPDF_ImageRenderer::GetDrawRect() const {
FX_RECT rect = m_ImageMatrix.GetUnitRect().GetOuterRect();
- rect.Intersect(m_pRenderStatus->m_pDevice->GetClipBox());
+ rect.Intersect(m_pRenderStatus->GetRenderDevice()->GetClipBox());
return rect;
}
@@ -226,9 +229,9 @@ void CPDF_ImageRenderer::CalculateDrawImage(
CFX_Matrix* pNewMatrix,
const FX_RECT& rect) const {
CPDF_RenderStatus bitmap_render;
- bitmap_render.Initialize(m_pRenderStatus->m_pContext.Get(), pBitmapDevice2,
+ bitmap_render.Initialize(m_pRenderStatus->GetContext(), pBitmapDevice2,
nullptr, nullptr, nullptr, nullptr, nullptr, 0,
- m_pRenderStatus->m_bDropObjects, nullptr, true);
+ m_pRenderStatus->GetDropObjects(), nullptr, true);
CPDF_ImageRenderer image_render;
if (image_render.Start(&bitmap_render, pDIBSource, 0xffffffff, 255,
pNewMatrix, m_Flags, true, FXDIB_BLEND_NORMAL)) {
@@ -277,10 +280,10 @@ bool CPDF_ImageRenderer::DrawPatternImage(const CFX_Matrix* pObj2Device) {
bitmap_device1.GetBitmap()->Clear(0xffffff);
CPDF_RenderStatus bitmap_render;
- bitmap_render.Initialize(m_pRenderStatus->m_pContext.Get(), &bitmap_device1,
+ bitmap_render.Initialize(m_pRenderStatus->GetContext(), &bitmap_device1,
nullptr, nullptr, nullptr, nullptr,
- &m_pRenderStatus->m_Options, 0,
- m_pRenderStatus->m_bDropObjects, nullptr, true);
+ m_pRenderStatus->GetRenderOptions(), 0,
+ m_pRenderStatus->GetDropObjects(), nullptr, true);
CFX_Matrix patternDevice = *pObj2Device;
patternDevice.Translate(static_cast<float>(-rect.left),
static_cast<float>(-rect.top));
@@ -304,7 +307,7 @@ bool CPDF_ImageRenderer::DrawPatternImage(const CFX_Matrix* pObj2Device) {
bitmap_device2.GetBitmap()->ConvertFormat(FXDIB_8bppMask);
bitmap_device1.GetBitmap()->MultiplyAlpha(bitmap_device2.GetBitmap());
bitmap_device1.GetBitmap()->MultiplyAlpha(255);
- m_pRenderStatus->m_pDevice->SetDIBitsWithBlend(
+ m_pRenderStatus->GetRenderDevice()->SetDIBitsWithBlend(
bitmap_device1.GetBitmap(), rect.left, rect.top, m_BlendType);
return false;
}
@@ -330,9 +333,9 @@ bool CPDF_ImageRenderer::DrawMaskedImage() {
bitmap_device1.GetBitmap()->Clear(0xffffff);
#endif
CPDF_RenderStatus bitmap_render;
- bitmap_render.Initialize(m_pRenderStatus->m_pContext.Get(), &bitmap_device1,
+ bitmap_render.Initialize(m_pRenderStatus->GetContext(), &bitmap_device1,
nullptr, nullptr, nullptr, nullptr, nullptr, 0,
- m_pRenderStatus->m_bDropObjects, nullptr, true);
+ m_pRenderStatus->GetDropObjects(), nullptr, true);
CPDF_ImageRenderer image_render;
if (image_render.Start(&bitmap_render, m_pDIBSource, 0, 255, &new_matrix,
m_Flags, true, FXDIB_BLEND_NORMAL)) {
@@ -351,7 +354,7 @@ bool CPDF_ImageRenderer::DrawMaskedImage() {
CalculateDrawImage(&bitmap_device1, &bitmap_device2, m_Loader.m_pMask,
&new_matrix, rect);
#ifdef _SKIA_SUPPORT_
- m_pRenderStatus->m_pDevice->SetBitsWithMask(
+ m_pRenderStatus->GetRenderDevice()->SetBitsWithMask(
bitmap_device1.GetBitmap(), bitmap_device2.GetBitmap(), rect.left,
rect.top, m_BitmapAlpha, m_BlendType);
#else
@@ -359,7 +362,7 @@ bool CPDF_ImageRenderer::DrawMaskedImage() {
bitmap_device1.GetBitmap()->MultiplyAlpha(bitmap_device2.GetBitmap());
if (m_BitmapAlpha < 255)
bitmap_device1.GetBitmap()->MultiplyAlpha(m_BitmapAlpha);
- m_pRenderStatus->m_pDevice->SetDIBitsWithBlend(
+ m_pRenderStatus->GetRenderDevice()->SetDIBitsWithBlend(
bitmap_device1.GetBitmap(), rect.left, rect.top, m_BlendType);
#endif // _SKIA_SUPPORT_
return false;
@@ -383,7 +386,7 @@ bool CPDF_ImageRenderer::StartDIBSource() {
RetainPtr<CFX_DIBitmap> premultiplied = m_pDIBSource->Clone(nullptr);
if (m_pDIBSource->HasAlpha())
CFX_SkiaDeviceDriver::PreMultiply(premultiplied);
- if (m_pRenderStatus->m_pDevice->StartDIBitsWithBlend(
+ if (m_pRenderStatus->GetRenderDevice()->StartDIBitsWithBlend(
premultiplied, m_BitmapAlpha, m_FillArgb, &m_ImageMatrix, m_Flags,
&m_DeviceHandle, m_BlendType)) {
if (m_DeviceHandle) {
@@ -393,7 +396,7 @@ bool CPDF_ImageRenderer::StartDIBSource() {
return false;
}
#else
- if (m_pRenderStatus->m_pDevice->StartDIBitsWithBlend(
+ if (m_pRenderStatus->GetRenderDevice()->StartDIBitsWithBlend(
m_pDIBSource, m_BitmapAlpha, m_FillArgb, &m_ImageMatrix, m_Flags,
&m_DeviceHandle, m_BlendType)) {
if (m_DeviceHandle) {
@@ -414,7 +417,7 @@ bool CPDF_ImageRenderer::StartDIBSource() {
return false;
}
- FX_RECT clip_box = m_pRenderStatus->m_pDevice->GetClipBox();
+ FX_RECT clip_box = m_pRenderStatus->GetRenderDevice()->GetClipBox();
clip_box.Intersect(image_rect);
m_Status = 2;
m_pTransformer = pdfium::MakeUnique<CFX_ImageTransformer>(
@@ -430,7 +433,7 @@ bool CPDF_ImageRenderer::StartDIBSource() {
int dest_left = dest_width > 0 ? image_rect.left : image_rect.right;
int dest_top = dest_height > 0 ? image_rect.top : image_rect.bottom;
if (m_pDIBSource->IsOpaqueImage() && m_BitmapAlpha == 255) {
- if (m_pRenderStatus->m_pDevice->StretchDIBitsWithFlagsAndBlend(
+ if (m_pRenderStatus->GetRenderDevice()->StretchDIBitsWithFlagsAndBlend(
m_pDIBSource, dest_left, dest_top, dest_width, dest_height, m_Flags,
m_BlendType)) {
return false;
@@ -439,7 +442,7 @@ bool CPDF_ImageRenderer::StartDIBSource() {
if (m_pDIBSource->IsAlphaMask()) {
if (m_BitmapAlpha != 255)
m_FillArgb = FXARGB_MUL_ALPHA(m_FillArgb, m_BitmapAlpha);
- if (m_pRenderStatus->m_pDevice->StretchBitMaskWithFlags(
+ if (m_pRenderStatus->GetRenderDevice()->StretchBitMaskWithFlags(
m_pDIBSource, dest_left, dest_top, dest_width, dest_height,
m_FillArgb, m_Flags)) {
return false;
@@ -450,7 +453,7 @@ bool CPDF_ImageRenderer::StartDIBSource() {
return true;
}
- FX_RECT clip_box = m_pRenderStatus->m_pDevice->GetClipBox();
+ FX_RECT clip_box = m_pRenderStatus->GetRenderDevice()->GetClipBox();
FX_RECT dest_rect = clip_box;
dest_rect.Intersect(image_rect);
FX_RECT dest_clip(
@@ -473,8 +476,8 @@ bool CPDF_ImageRenderer::StartBitmapAlpha() {
path.Transform(&m_ImageMatrix);
uint32_t fill_color =
ArgbEncode(0xff, m_BitmapAlpha, m_BitmapAlpha, m_BitmapAlpha);
- m_pRenderStatus->m_pDevice->DrawPath(&path, nullptr, nullptr, fill_color, 0,
- FXFILL_WINDING);
+ m_pRenderStatus->GetRenderDevice()->DrawPath(&path, nullptr, nullptr,
+ fill_color, 0, FXFILL_WINDING);
return false;
}
RetainPtr<CFX_DIBSource> pAlphaMask;
@@ -491,7 +494,7 @@ bool CPDF_ImageRenderer::StartBitmapAlpha() {
if (!pTransformed)
return true;
- m_pRenderStatus->m_pDevice->SetBitMask(
+ m_pRenderStatus->GetRenderDevice()->SetBitMask(
pTransformed, left, top,
ArgbEncode(0xff, m_BitmapAlpha, m_BitmapAlpha, m_BitmapAlpha));
return false;
@@ -504,7 +507,7 @@ bool CPDF_ImageRenderer::StartBitmapAlpha() {
m_ImageMatrix.d > 0 ? -image_rect.Height() : image_rect.Height();
int left = dest_width > 0 ? image_rect.left : image_rect.right;
int top = dest_height > 0 ? image_rect.top : image_rect.bottom;
- m_pRenderStatus->m_pDevice->StretchBitMask(
+ m_pRenderStatus->GetRenderDevice()->StretchBitMask(
pAlphaMask, left, top, dest_width, dest_height,
ArgbEncode(0xff, m_BitmapAlpha, m_BitmapAlpha, m_BitmapAlpha));
return false;
@@ -522,21 +525,22 @@ bool CPDF_ImageRenderer::Continue(IFX_PauseIndicator* pPause) {
if (pBitmap->IsAlphaMask()) {
if (m_BitmapAlpha != 255)
m_FillArgb = FXARGB_MUL_ALPHA(m_FillArgb, m_BitmapAlpha);
- m_Result = m_pRenderStatus->m_pDevice->SetBitMask(
+ m_Result = m_pRenderStatus->GetRenderDevice()->SetBitMask(
pBitmap, m_pTransformer->result().left, m_pTransformer->result().top,
m_FillArgb);
} else {
if (m_BitmapAlpha != 255)
pBitmap->MultiplyAlpha(m_BitmapAlpha);
- m_Result = m_pRenderStatus->m_pDevice->SetDIBitsWithBlend(
+ m_Result = m_pRenderStatus->GetRenderDevice()->SetDIBitsWithBlend(
pBitmap, m_pTransformer->result().left, m_pTransformer->result().top,
m_BlendType);
}
return false;
}
- if (m_Status == 3)
- return m_pRenderStatus->m_pDevice->ContinueDIBits(m_DeviceHandle.get(),
- pPause);
+ if (m_Status == 3) {
+ return m_pRenderStatus->GetRenderDevice()->ContinueDIBits(
+ m_DeviceHandle.get(), pPause);
+ }
if (m_Status == 4) {
if (m_Loader.Continue(pPause, m_pRenderStatus.Get()))
diff --git a/core/fpdfapi/render/cpdf_pagerendercache.cpp b/core/fpdfapi/render/cpdf_pagerendercache.cpp
index 42205ebe63..0d01589af3 100644
--- a/core/fpdfapi/render/cpdf_pagerendercache.cpp
+++ b/core/fpdfapi/render/cpdf_pagerendercache.cpp
@@ -95,8 +95,8 @@ bool CPDF_PageRenderCache::StartGetCachedBitmap(
new CPDF_ImageCacheEntry(m_pPage->m_pDocument.Get(), pImage);
}
int ret = m_pCurImageCacheEntry->StartGetCachedBitmap(
- pRenderStatus->m_pFormResource.Get(), m_pPage->m_pPageResources.Get(),
- bStdCS, GroupFamily, bLoadMask, pRenderStatus);
+ pRenderStatus->GetFormResource(), m_pPage->m_pPageResources.Get(), bStdCS,
+ GroupFamily, bLoadMask, pRenderStatus);
if (ret == 2)
return true;
diff --git a/core/fpdfapi/render/cpdf_progressiverenderer.cpp b/core/fpdfapi/render/cpdf_progressiverenderer.cpp
index d906a9325d..275fc6b85e 100644
--- a/core/fpdfapi/render/cpdf_progressiverenderer.cpp
+++ b/core/fpdfapi/render/cpdf_progressiverenderer.cpp
@@ -94,10 +94,10 @@ void CPDF_ProgressiveRenderer::Continue(IFX_PauseIndicator* pPause) {
pCurObj, &m_pCurrentLayer->m_Matrix, pPause)) {
return;
}
- if (pCurObj->IsImage() &&
- m_pRenderStatus->m_Options.m_Flags & RENDER_LIMITEDIMAGECACHE) {
+ if (pCurObj->IsImage() && m_pRenderStatus->GetRenderOptions()->m_Flags &
+ RENDER_LIMITEDIMAGECACHE) {
m_pContext->GetPageCache()->CacheOptimization(
- m_pRenderStatus->m_Options.m_dwLimitCacheSize);
+ m_pRenderStatus->GetRenderOptions()->m_dwLimitCacheSize);
}
if (pCurObj->IsForm() || pCurObj->IsShading())
nObjsToGo = 0;
diff --git a/core/fpdfapi/render/cpdf_rendercontext.cpp b/core/fpdfapi/render/cpdf_rendercontext.cpp
index 3c08295480..2fc7da812d 100644
--- a/core/fpdfapi/render/cpdf_rendercontext.cpp
+++ b/core/fpdfapi/render/cpdf_rendercontext.cpp
@@ -78,9 +78,11 @@ void CPDF_RenderContext::Render(CFX_RenderDevice* pDevice,
nullptr);
status.RenderObjectList(layer.m_pObjectHolder.Get(), &layer.m_Matrix);
}
- if (status.m_Options.m_Flags & RENDER_LIMITEDIMAGECACHE)
- m_pPageCache->CacheOptimization(status.m_Options.m_dwLimitCacheSize);
- if (status.m_bStopped)
+ if (status.GetRenderOptions()->m_Flags & RENDER_LIMITEDIMAGECACHE) {
+ m_pPageCache->CacheOptimization(
+ status.GetRenderOptions()->m_dwLimitCacheSize);
+ }
+ if (status.IsStopped())
break;
}
}
diff --git a/core/fpdfapi/render/cpdf_renderstatus.h b/core/fpdfapi/render/cpdf_renderstatus.h
index def3702e68..102bc2f2e6 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.h
+++ b/core/fpdfapi/render/cpdf_renderstatus.h
@@ -64,21 +64,41 @@ class CPDF_RenderStatus {
IFX_PauseIndicator* pPause);
void ProcessClipPath(const CPDF_ClipPath& ClipPath,
const CFX_Matrix* pObj2Device);
+
+ uint32_t GetGroupFamily() const { return m_GroupFamily; }
+ bool GetLoadMask() const { return m_bLoadMask; }
+ bool GetDropObjects() const { return m_bDropObjects; }
+ bool IsPrint() const { return m_bPrint; }
+ bool IsStopped() const { return m_bStopped; }
CPDF_RenderContext* GetContext() const { return m_pContext.Get(); }
+ CPDF_Dictionary* GetFormResource() const { return m_pFormResource.Get(); }
+ CPDF_Dictionary* GetPageResource() const { return m_pPageResource.Get(); }
+ CFX_RenderDevice* GetRenderDevice() const { return m_pDevice; }
+ const CPDF_RenderOptions* GetRenderOptions() const { return &m_Options; }
#if defined _SKIA_SUPPORT_
void DebugVerifyDeviceIsPreMultiplied() const;
#endif
- CPDF_RenderOptions m_Options;
- UnownedPtr<CPDF_Dictionary> m_pFormResource;
- UnownedPtr<CPDF_Dictionary> m_pPageResource;
- std::vector<CPDF_Type3Font*> m_Type3FontCache;
+ RetainPtr<CPDF_TransferFunc> GetTransferFunc(CPDF_Object* pObject) const;
+ FX_ARGB GetFillArgb(CPDF_PageObject* pObj, bool bType3 = false) const;
+ void DrawTilingPattern(CPDF_TilingPattern* pPattern,
+ CPDF_PageObject* pPageObj,
+ const CFX_Matrix* pObj2Device,
+ bool bStroke);
+ void DrawShadingPattern(CPDF_ShadingPattern* pPattern,
+ const CPDF_PageObject* pPageObj,
+ const CFX_Matrix* pObj2Device,
+ bool bStroke);
+ void CompositeDIBitmap(const RetainPtr<CFX_DIBitmap>& pDIBitmap,
+ int left,
+ int top,
+ FX_ARGB mask_argb,
+ int bitmap_alpha,
+ int blend_mode,
+ int bIsolated);
private:
- friend class CPDF_ImageRenderer;
- friend class CPDF_RenderContext;
-
bool ProcessTransparency(CPDF_PageObject* PageObj,
const CFX_Matrix* pObj2Device);
void ProcessObjectNoClip(CPDF_PageObject* PageObj,
@@ -95,25 +115,10 @@ class CPDF_RenderStatus {
const CFX_Matrix* pObj2Device,
const CPDF_Color* pColor,
bool bStroke);
- void DrawTilingPattern(CPDF_TilingPattern* pPattern,
- CPDF_PageObject* pPageObj,
- const CFX_Matrix* pObj2Device,
- bool bStroke);
- void DrawShadingPattern(CPDF_ShadingPattern* pPattern,
- const CPDF_PageObject* pPageObj,
- const CFX_Matrix* pObj2Device,
- bool bStroke);
bool SelectClipPath(const CPDF_PathObject* pPathObj,
const CFX_Matrix* pObj2Device,
bool bStroke);
bool ProcessImage(CPDF_ImageObject* pImageObj, const CFX_Matrix* pObj2Device);
- void CompositeDIBitmap(const RetainPtr<CFX_DIBitmap>& pDIBitmap,
- int left,
- int top,
- FX_ARGB mask_argb,
- int bitmap_alpha,
- int blend_mode,
- int bIsolated);
void ProcessShading(const CPDF_ShadingObject* pShadingObj,
const CFX_Matrix* pObj2Device);
void DrawShading(CPDF_ShadingPattern* pPattern,
@@ -147,8 +152,6 @@ class CPDF_RenderStatus {
static std::unique_ptr<CPDF_GraphicStates> CloneObjStates(
const CPDF_GraphicStates* pPathObj,
bool bStroke);
- 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,
const CFX_Matrix* pObj2Device,
@@ -159,6 +162,10 @@ class CPDF_RenderStatus {
static const int kRenderMaxRecursionDepth = 64;
static int s_CurrentRecursionDepth;
+ CPDF_RenderOptions m_Options;
+ UnownedPtr<CPDF_Dictionary> m_pFormResource;
+ UnownedPtr<CPDF_Dictionary> m_pPageResource;
+ std::vector<CPDF_Type3Font*> m_Type3FontCache;
UnownedPtr<CPDF_RenderContext> m_pContext;
bool m_bStopped;
CFX_RenderDevice* m_pDevice;