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

Unified Diff: core/fxge/dib/fx_dib_composite.cpp

Issue 2031873003: Get rid of NULLs in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@nullptr_fpdfsdk
Patch Set: Created 4 years, 6 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_font/include/cpdf_font.h ('k') | fpdfsdk/fpdfdoc_embeddertest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/dib/fx_dib_composite.cpp
diff --git a/core/fxge/dib/fx_dib_composite.cpp b/core/fxge/dib/fx_dib_composite.cpp
index 28f6e4904465e1c89841d067c4759cdbd24e056b..acfed6849311cc22eb91c6d6b5cba31a3b66e704 100644
--- a/core/fxge/dib/fx_dib_composite.cpp
+++ b/core/fxge/dib/fx_dib_composite.cpp
@@ -4513,8 +4513,8 @@ FX_BOOL CFX_DIBitmap::CompositeBitmap(int dest_left,
}
CFX_ScanlineCompositor compositor;
if (!compositor.Init(GetFormat(), pSrcBitmap->GetFormat(), width,
- pSrcBitmap->GetPalette(), 0, blend_type,
- pClipMask != nullptr, bRgbByteOrder, 0, pIccTransform)) {
+ pSrcBitmap->GetPalette(), 0, blend_type, !!pClipMask,
+ bRgbByteOrder, 0, pIccTransform)) {
return FALSE;
}
int dest_Bpp = m_bpp / 8;
@@ -4594,8 +4594,8 @@ FX_BOOL CFX_DIBitmap::CompositeMask(int dest_left,
int Bpp = GetBPP() / 8;
CFX_ScanlineCompositor compositor;
if (!compositor.Init(GetFormat(), pMask->GetFormat(), width, nullptr, color,
- blend_type, pClipMask != nullptr, bRgbByteOrder,
- alpha_flag, pIccTransform)) {
+ blend_type, !!pClipMask, bRgbByteOrder, alpha_flag,
+ pIccTransform)) {
return FALSE;
}
for (int row = 0; row < height; row++) {
@@ -4887,8 +4887,8 @@ FX_BOOL CFX_BitmapComposer::SetInfo(int width,
m_SrcFormat = src_format;
if (!m_Compositor.Init(m_pBitmap->GetFormat(), src_format, width, pSrcPalette,
m_MaskColor, FXDIB_BLEND_NORMAL,
- m_pClipMask != nullptr || (m_BitmapAlpha < 255),
- m_bRgbByteOrder, m_AlphaFlag, m_pIccTransform)) {
+ m_pClipMask || (m_BitmapAlpha < 255), m_bRgbByteOrder,
+ m_AlphaFlag, m_pIccTransform)) {
return FALSE;
}
if (m_bVertical) {
« no previous file with comments | « core/fpdfapi/fpdf_font/include/cpdf_font.h ('k') | fpdfsdk/fpdfdoc_embeddertest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698