summaryrefslogtreecommitdiff
path: root/core/src/fxge/ge
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-14 18:27:25 -0800
committerLei Zhang <thestig@chromium.org>2015-12-14 18:27:25 -0800
commit96660d6f382204339d6b1aadc3913303d436e252 (patch)
treeb5f84756e1a89251831cebc05b9d4e1f6cb2027b /core/src/fxge/ge
parentd983b09c3ae29a97cba8e9ec9c6351545f6087ee (diff)
downloadpdfium-96660d6f382204339d6b1aadc3913303d436e252.tar.xz
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 .
Diffstat (limited to 'core/src/fxge/ge')
-rw-r--r--core/src/fxge/ge/fx_ge_device.cpp1
-rw-r--r--core/src/fxge/ge/fx_ge_ps.cpp4
-rw-r--r--core/src/fxge/ge/fx_ge_text.cpp2
3 files changed, 3 insertions, 4 deletions
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;