From 96660d6f382204339d6b1aadc3913303d436e252 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 14 Dec 2015 18:27:25 -0800 Subject: Merge to XFA: Get rid of most instance of 'foo != NULL' TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1512763013 . (cherry picked from commit e3c7c2b54348da4a6939f6672f6c6bff126815a7) Review URL: https://codereview.chromium.org/1529553003 . --- core/src/fxge/ge/fx_ge_device.cpp | 1 - core/src/fxge/ge/fx_ge_ps.cpp | 4 ++-- core/src/fxge/ge/fx_ge_text.cpp | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'core/src/fxge/ge') diff --git a/core/src/fxge/ge/fx_ge_device.cpp b/core/src/fxge/ge/fx_ge_device.cpp index 94efd864c0..37204268f2 100644 --- a/core/src/fxge/ge/fx_ge_device.cpp +++ b/core/src/fxge/ge/fx_ge_device.cpp @@ -19,7 +19,6 @@ void CFX_RenderDevice::SetDeviceDriver(IFX_RenderDeviceDriver* pDriver) { InitDeviceInfo(); } void CFX_RenderDevice::InitDeviceInfo() { - ASSERT(m_pDeviceDriver != NULL); m_Width = m_pDeviceDriver->GetDeviceCaps(FXDC_PIXEL_WIDTH); m_Height = m_pDeviceDriver->GetDeviceCaps(FXDC_PIXEL_HEIGHT); m_bpp = m_pDeviceDriver->GetDeviceCaps(FXDC_BITS_PIXEL); diff --git a/core/src/fxge/ge/fx_ge_ps.cpp b/core/src/fxge/ge/fx_ge_ps.cpp index 6ce8f4635b..ceb2acf2bc 100644 --- a/core/src/fxge/ge/fx_ge_ps.cpp +++ b/core/src/fxge/ge/fx_ge_ps.cpp @@ -417,7 +417,7 @@ FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, pConverted = pSource->CloneConvert(FXDIB_Rgb); break; case FXDIB_8bppRgb: - if (pSource->GetPalette() != NULL) { + if (pSource->GetPalette()) { pConverted = pSource->CloneConvert(FXDIB_Rgb); } break; @@ -425,7 +425,7 @@ FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, pConverted = pSource->CloneConvert(FXDIB_Cmyk); break; case FXDIB_8bppCmyk: - if (pSource->GetPalette() != NULL) { + if (pSource->GetPalette()) { pConverted = pSource->CloneConvert(FXDIB_Cmyk); } break; diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp index d330576433..cd6b690a12 100644 --- a/core/src/fxge/ge/fx_ge_text.cpp +++ b/core/src/fxge/ge/fx_ge_text.cpp @@ -229,7 +229,7 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars, if (FXSYS_fabs(char2device.a) + FXSYS_fabs(char2device.b) > 50 * 1.0f || ((m_DeviceClass == FXDC_PRINTER && !m_pDeviceDriver->IsPSPrintDriver()) && !(text_flags & FXTEXT_PRINTIMAGETEXT))) { - if (pFont->GetFace() != NULL || + if (pFont->GetFace() || (pFont->GetSubstFont()->m_SubstFlags & FXFONT_SUBST_GLYPHPATH)) { int nPathFlags = (text_flags & FXTEXT_NOSMOOTH) == 0 ? 0 : FXFILL_NOPATHSMOOTH; -- cgit v1.2.3