Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1664)

Unified Diff: core/fpdfapi/fpdf_render/fpdf_render.cpp

Issue 2285513002: Remove CFX_CountRef::IsNull in favor of operator bool (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@retain_again
Patch Set: Rebase, FX_BOOL Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp ('k') | core/fxcrt/include/cfx_count_ref.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_render/fpdf_render.cpp
diff --git a/core/fpdfapi/fpdf_render/fpdf_render.cpp b/core/fpdfapi/fpdf_render/fpdf_render.cpp
index 576be6a8d4304caee17e5fd9aa68a35af35d077e..f24a66857d2ded5b88ec260d251204742881c28e 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render.cpp
@@ -260,7 +260,7 @@ void CPDF_RenderStatus::RenderSingleObject(const CPDF_PageObject* pObj,
return;
}
m_pCurObj = pObj;
- if (m_Options.m_pOCContext && pObj->m_ContentMark.NotNull()) {
+ if (m_Options.m_pOCContext && pObj->m_ContentMark) {
if (!m_Options.m_pOCContext->CheckObjectVisible(pObj)) {
return;
}
@@ -289,7 +289,7 @@ FX_BOOL CPDF_RenderStatus::ContinueSingleObject(const CPDF_PageObject* pObj,
}
m_pCurObj = pObj;
- if (m_Options.m_pOCContext && pObj->m_ContentMark.NotNull() &&
+ if (m_Options.m_pOCContext && pObj->m_ContentMark &&
!m_Options.m_pOCContext->CheckObjectVisible(pObj)) {
return FALSE;
}
@@ -574,8 +574,8 @@ FX_ARGB CPDF_RenderStatus::GetStrokeArgb(const CPDF_PageObject* pObj) const {
}
void CPDF_RenderStatus::ProcessClipPath(CPDF_ClipPath ClipPath,
const CFX_Matrix* pObj2Device) {
- if (ClipPath.IsNull()) {
- if (!m_LastClipPath.IsNull()) {
+ if (!ClipPath) {
+ if (m_LastClipPath) {
m_pDevice->RestoreState(true);
m_LastClipPath.SetNull();
}
@@ -634,9 +634,9 @@ void CPDF_RenderStatus::ProcessClipPath(CPDF_ClipPath ClipPath,
void CPDF_RenderStatus::DrawClipPath(CPDF_ClipPath ClipPath,
const CFX_Matrix* pObj2Device) {
- if (ClipPath.IsNull()) {
+ if (!ClipPath)
return;
- }
+
int fill_mode = 0;
if (m_Options.m_Flags & RENDER_NOPATHSMOOTH) {
fill_mode |= FXFILL_NOPATHSMOOTH;
@@ -713,12 +713,10 @@ FX_BOOL CPDF_RenderStatus::ProcessTransparency(const CPDF_PageObject* pPageObj,
pFormResource = pFormObj->m_pForm->m_pFormDict->GetDictBy("Resources");
}
}
- FX_BOOL bTextClip = FALSE;
- if (pPageObj->m_ClipPath.NotNull() && pPageObj->m_ClipPath.GetTextCount() &&
- m_pDevice->GetDeviceClass() == FXDC_DISPLAY &&
- !(m_pDevice->GetDeviceCaps(FXDC_RENDER_CAPS) & FXRC_SOFT_CLIP)) {
- bTextClip = TRUE;
- }
+ bool bTextClip =
+ (pPageObj->m_ClipPath && pPageObj->m_ClipPath.GetTextCount() &&
+ m_pDevice->GetDeviceClass() == FXDC_DISPLAY &&
+ !(m_pDevice->GetDeviceCaps(FXDC_RENDER_CAPS) & FXRC_SOFT_CLIP));
if ((m_Options.m_Flags & RENDER_OVERPRINT) && pPageObj->IsImage() &&
pGeneralState && pGeneralState->m_FillOP && pGeneralState->m_StrokeOP) {
CPDF_Document* pDocument = nullptr;
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp ('k') | core/fxcrt/include/cfx_count_ref.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698