summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render.cpp2
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render_image.cpp8
-rw-r--r--core/fxcrt/extension.h2
-rw-r--r--core/fxge/ge/fx_ge_text.cpp2
4 files changed, 7 insertions, 7 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);
diff --git a/core/fxcrt/extension.h b/core/fxcrt/extension.h
index a8a099c664..b0e7b9e117 100644
--- a/core/fxcrt/extension.h
+++ b/core/fxcrt/extension.h
@@ -241,7 +241,7 @@ class CFX_MemoryStream final : public IFX_MemoryStream {
}
FX_BOOL Flush() override { return TRUE; }
FX_BOOL IsConsecutive() const override {
- return m_dwFlags & FX_MEMSTREAM_Consecutive;
+ return !!(m_dwFlags & FX_MEMSTREAM_Consecutive);
}
void EstimateSize(size_t nInitSize, size_t nGrowSize) override {
if (m_dwFlags & FX_MEMSTREAM_Consecutive) {
diff --git a/core/fxge/ge/fx_ge_text.cpp b/core/fxge/ge/fx_ge_text.cpp
index 9ad93d872a..3372b7f95d 100644
--- a/core/fxge/ge/fx_ge_text.cpp
+++ b/core/fxge/ge/fx_ge_text.cpp
@@ -413,7 +413,7 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars,
}
continue;
}
- FX_BOOL bBGRStripe = text_flags & FXTEXT_BGR_STRIPE;
+ bool bBGRStripe = !!(text_flags & FXTEXT_BGR_STRIPE);
ncols /= 3;
int x_subpixel = (int)(glyph.m_fOriginX * 3) % 3;
uint8_t* src_buf = pGlyph->GetBuffer();