diff options
author | Lei Zhang <thestig@chromium.org> | 2015-05-06 15:09:06 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-05-06 15:09:06 -0700 |
commit | 2c4104443f5a7aea225bd853770cdc11ab431932 (patch) | |
tree | 1a2b640d07a4501c7409f9ad5a6323971f813365 /core/src/fxcodec/codec/fx_codec_icc.cpp | |
parent | 5734d862cb22eca6e9644ea7d1c096d70123434f (diff) | |
download | pdfium-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_icc.cpp')
-rw-r--r-- | core/src/fxcodec/codec/fx_codec_icc.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_icc.cpp b/core/src/fxcodec/codec/fx_codec_icc.cpp index 1a4fce63f2..a984fecc30 100644 --- a/core/src/fxcodec/codec/fx_codec_icc.cpp +++ b/core/src/fxcodec/codec/fx_codec_icc.cpp @@ -148,10 +148,7 @@ void* IccLib_CreateTransform(const unsigned char* pSrcProfileData, FX_DWORD dwSr cmsCloseProfile(dstProfile); return NULL; } - pCmm = FX_NEW CLcmsCmm; - if (pCmm == NULL) { - return NULL; - } + pCmm = new CLcmsCmm; pCmm->m_nSrcComponents = nSrcComponents; pCmm->m_nDstComponents = nDstComponents; pCmm->m_hTransform = hTransform; @@ -438,10 +435,7 @@ FX_LPVOID CCodec_IccModule::CreateProfile(ICodec_IccModule::IccParam* pIccParam, ASSERT(pTransformKey); pTransformKey->AppendBlock(ProfileKey.GetBuffer(0), ProfileKey.GetLength()); if (!m_MapProfile.Lookup(ProfileKey, (FX_LPVOID&)pCache)) { - pCache = FX_NEW CFX_IccProfileCache; - if (pCache == NULL) { - return NULL; - } + pCache = new CFX_IccProfileCache; switch (pIccParam->dwProfileType) { case Icc_PARAMTYPE_BUFFER: pCache->m_pProfile = cmsOpenProfileFromMem(pIccParam->pProfileData, pIccParam->dwProfileSize); @@ -503,11 +497,7 @@ FX_LPVOID CCodec_IccModule::CreateTransform(ICodec_IccModule::IccParam* pInputPa pCmm->m_nSrcComponents = T_CHANNELS(dwInputProfileType); pCmm->m_nDstComponents = T_CHANNELS(dwOutputProfileType); pCmm->m_bLab = T_COLORSPACE(pInputParam->dwFormat) == PT_Lab; - pTransformCache = FX_NEW CFX_IccTransformCache(pCmm); - if (pTransformCache == NULL) { - FX_Free(pCmm); - return NULL; - } + pTransformCache = new CFX_IccTransformCache(pCmm); if (pProofProfile) { pTransformCache->m_pIccTransform = cmsCreateProofingTransform(pInputProfile, dwInputProfileType, pOutputProfile, dwOutputProfileType, pProofProfile, dwIntent, dwPrfIntent, dwPrfFlag); |