summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/codec/fx_codec_progress.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-05-06 15:09:06 -0700
committerLei Zhang <thestig@chromium.org>2015-05-06 15:09:06 -0700
commit2c4104443f5a7aea225bd853770cdc11ab431932 (patch)
tree1a2b640d07a4501c7409f9ad5a6323971f813365 /core/src/fxcodec/codec/fx_codec_progress.cpp
parent5734d862cb22eca6e9644ea7d1c096d70123434f (diff)
downloadpdfium-2c4104443f5a7aea225bd853770cdc11ab431932.tar.xz
Merge to XFA: Replace FX_NEW with new, remote tests from fxcodec
Review URL: https://codereview.chromium.org/1084303002 (cherry picked from commit cfc1a654ef3e8b65bc447815d35932c185bf1422) R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1125363002
Diffstat (limited to 'core/src/fxcodec/codec/fx_codec_progress.cpp')
-rw-r--r--core/src/fxcodec/codec/fx_codec_progress.cpp37
1 files changed, 6 insertions, 31 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_progress.cpp b/core/src/fxcodec/codec/fx_codec_progress.cpp
index 542ac681e6..0a51a9d437 100644
--- a/core/src/fxcodec/codec/fx_codec_progress.cpp
+++ b/core/src/fxcodec/codec/fx_codec_progress.cpp
@@ -2110,12 +2110,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode(IFX_Pause* pPause)
}
return m_status = FXCODEC_STATUS_DECODE_FINISH;
} else {
- CFX_DIBitmap* pDIBitmap = FX_NEW CFX_DIBitmap;
- if(pDIBitmap == NULL) {
- m_pDeviceBitmap = NULL;
- m_pFile = NULL;
- return m_status = FXCODEC_STATUS_ERR_MEMORY;
- }
+ CFX_DIBitmap* pDIBitmap = new CFX_DIBitmap;
pDIBitmap->Create(m_SrcWidth, m_SrcHeight, FXDIB_Argb);
if(pDIBitmap->GetBuffer() == NULL) {
delete pDIBitmap;
@@ -2146,39 +2141,19 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode(IFX_Pause* pPause)
CFX_DIBitmap* pFormatBitmap = NULL;
switch(m_pDeviceBitmap->GetFormat()) {
case FXDIB_8bppRgb:
- pFormatBitmap = FX_NEW CFX_DIBitmap;
- if(pFormatBitmap == NULL) {
- m_pDeviceBitmap = NULL;
- m_pFile = NULL;
- return m_status = FXCODEC_STATUS_ERR_MEMORY;
- }
+ pFormatBitmap = new CFX_DIBitmap;
pFormatBitmap->Create(pClipBitmap->GetWidth(), pClipBitmap->GetHeight(), FXDIB_8bppRgb);
break;
case FXDIB_8bppMask:
- pFormatBitmap = FX_NEW CFX_DIBitmap;
- if(pFormatBitmap == NULL) {
- m_pDeviceBitmap = NULL;
- m_pFile = NULL;
- return m_status = FXCODEC_STATUS_ERR_MEMORY;
- }
+ pFormatBitmap = new CFX_DIBitmap;
pFormatBitmap->Create(pClipBitmap->GetWidth(), pClipBitmap->GetHeight(), FXDIB_8bppMask);
break;
case FXDIB_Rgb:
- pFormatBitmap = FX_NEW CFX_DIBitmap;
- if(pFormatBitmap == NULL) {
- m_pDeviceBitmap = NULL;
- m_pFile = NULL;
- return m_status = FXCODEC_STATUS_ERR_MEMORY;
- }
+ pFormatBitmap = new CFX_DIBitmap;
pFormatBitmap->Create(pClipBitmap->GetWidth(), pClipBitmap->GetHeight(), FXDIB_Rgb);
break;
case FXDIB_Rgb32:
- pFormatBitmap = FX_NEW CFX_DIBitmap;
- if(pFormatBitmap == NULL) {
- m_pDeviceBitmap = NULL;
- m_pFile = NULL;
- return m_status = FXCODEC_STATUS_ERR_MEMORY;
- }
+ pFormatBitmap = new CFX_DIBitmap;
pFormatBitmap->Create(pClipBitmap->GetWidth(), pClipBitmap->GetHeight(), FXDIB_Rgb32);
break;
case FXDIB_Argb:
@@ -2259,5 +2234,5 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode(IFX_Pause* pPause)
}
ICodec_ProgressiveDecoder* CCodec_ModuleMgr::CreateProgressiveDecoder()
{
- return FX_NEW CCodec_ProgressiveDecoder(this);
+ return new CCodec_ProgressiveDecoder(this);
}