summaryrefslogtreecommitdiff
path: root/core/src/fxge/dib/fx_dib_composite.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-14 22:22:13 -0700
committerLei Zhang <thestig@chromium.org>2015-08-14 22:22:13 -0700
commitda180e9fdd4385df024cc18046f62ca47bc74d74 (patch)
tree931e0e64ac2cbc82e3718e43418ee6bd676da4a5 /core/src/fxge/dib/fx_dib_composite.cpp
parent2b1a2d528469cda4e9f3e36d3c7a649e0d476480 (diff)
downloadpdfium-da180e9fdd4385df024cc18046f62ca47bc74d74.tar.xz
Merge to XFA: Don't bother checking pointers before delete[] and FX_Free().
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1297713003 . (cherry picked from commit cb62e7657b3a9a04142028a4e6614029a08e894b) Review URL: https://codereview.chromium.org/1287053005 .
Diffstat (limited to 'core/src/fxge/dib/fx_dib_composite.cpp')
-rw-r--r--core/src/fxge/dib/fx_dib_composite.cpp24
1 files changed, 6 insertions, 18 deletions
diff --git a/core/src/fxge/dib/fx_dib_composite.cpp b/core/src/fxge/dib/fx_dib_composite.cpp
index 84062d80b1..89a52f3dba 100644
--- a/core/src/fxge/dib/fx_dib_composite.cpp
+++ b/core/src/fxge/dib/fx_dib_composite.cpp
@@ -4193,12 +4193,8 @@ CFX_ScanlineCompositor::CFX_ScanlineCompositor() {
m_BlendType = FXDIB_BLEND_NORMAL;
}
CFX_ScanlineCompositor::~CFX_ScanlineCompositor() {
- if (m_pSrcPalette) {
- FX_Free(m_pSrcPalette);
- }
- if (m_pCacheScanline) {
- FX_Free(m_pCacheScanline);
- }
+ FX_Free(m_pSrcPalette);
+ FX_Free(m_pCacheScanline);
}
FX_BOOL CFX_ScanlineCompositor::Init(FXDIB_Format dest_format,
FXDIB_Format src_format,
@@ -5010,18 +5006,10 @@ CFX_BitmapComposer::CFX_BitmapComposer() {
m_BlendType = FXDIB_BLEND_NORMAL;
}
CFX_BitmapComposer::~CFX_BitmapComposer() {
- if (m_pScanlineV) {
- FX_Free(m_pScanlineV);
- }
- if (m_pScanlineAlphaV) {
- FX_Free(m_pScanlineAlphaV);
- }
- if (m_pClipScanV) {
- FX_Free(m_pClipScanV);
- }
- if (m_pAddClipScan) {
- FX_Free(m_pAddClipScan);
- }
+ FX_Free(m_pScanlineV);
+ FX_Free(m_pScanlineAlphaV);
+ FX_Free(m_pClipScanV);
+ FX_Free(m_pAddClipScan);
}
void CFX_BitmapComposer::Compose(CFX_DIBitmap* pDest,
const CFX_ClipRgn* pClipRgn,