summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render.cpp2
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render_image.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/core/fpdfapi/fpdf_render/fpdf_render.cpp b/core/fpdfapi/fpdf_render/fpdf_render.cpp
index 4f83370ad2..4ca8a53f72 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render.cpp
@@ -750,7 +750,7 @@ FX_BOOL CPDF_RenderStatus::ProcessTransparency(const CPDF_PageObject* pPageObj,
!bTextClip && !bGroupTransparent) {
return FALSE;
}
- FX_BOOL isolated = Transparency & PDFTRANS_ISOLATED;
+ bool isolated = !!(Transparency & PDFTRANS_ISOLATED);
if (m_bPrint) {
FX_BOOL bRet = FALSE;
int rendCaps = m_pDevice->GetRenderCaps();
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/fpdfapi/fpdf_render/fpdf_render_image.cpp
index 528ad78d2b..17851b8b4b 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_image.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_image.cpp
@@ -45,8 +45,6 @@ void CPDF_RenderStatus::CompositeDIBitmap(CFX_DIBitmap* pDIBitmap,
if (!pDIBitmap) {
return;
}
- FX_BOOL bIsolated = Transparency & PDFTRANS_ISOLATED;
- FX_BOOL bGroup = Transparency & PDFTRANS_GROUP;
if (blend_mode == FXDIB_BLEND_NORMAL) {
if (!pDIBitmap->IsAlphaMask()) {
if (bitmap_alpha < 255) {
@@ -66,8 +64,10 @@ void CPDF_RenderStatus::CompositeDIBitmap(CFX_DIBitmap* pDIBitmap,
}
}
}
- FX_BOOL bBackAlphaRequired = blend_mode && bIsolated && !m_bDropObjects;
- FX_BOOL bGetBackGround =
+ bool bIsolated = !!(Transparency & PDFTRANS_ISOLATED);
+ bool bGroup = !!(Transparency & PDFTRANS_GROUP);
+ bool bBackAlphaRequired = blend_mode && bIsolated && !m_bDropObjects;
+ bool bGetBackGround =
((m_pDevice->GetRenderCaps() & FXRC_ALPHA_OUTPUT)) ||
(!(m_pDevice->GetRenderCaps() & FXRC_ALPHA_OUTPUT) &&
(m_pDevice->GetRenderCaps() & FXRC_GET_BITS) && !bBackAlphaRequired);