Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Unified Diff: core/src/fxge/dib/fx_dib_transform.cpp

Issue 1062863006: Remove checks in fxge/{apple,win32,skia,dib} now that FX_NEW cant return 0 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix missing |new| typo. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fxge/dib/fx_dib_main.cpp ('k') | core/src/fxge/skia/fx_skia_device.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/dib/fx_dib_transform.cpp
diff --git a/core/src/fxge/dib/fx_dib_transform.cpp b/core/src/fxge/dib/fx_dib_transform.cpp
index 65afdd6b3aa7a6c57b3516704554326905a80b7d..457fe2e1f102c979f0a19033809549bb4c04c8a8 100644
--- a/core/src/fxge/dib/fx_dib_transform.cpp
+++ b/core/src/fxge/dib/fx_dib_transform.cpp
@@ -63,10 +63,7 @@ CFX_DIBitmap* CFX_DIBSource::SwapXY(FX_BOOL bXFlip, FX_BOOL bYFlip, const FX_REC
if (dest_clip.IsEmpty()) {
return NULL;
}
- CFX_DIBitmap* pTransBitmap = FX_NEW CFX_DIBitmap;
- if (!pTransBitmap) {
- return NULL;
- }
+ CFX_DIBitmap* pTransBitmap = new CFX_DIBitmap;
int result_height = dest_clip.Height(), result_width = dest_clip.Width();
if (!pTransBitmap->Create(result_width, result_height, GetFormat())) {
delete pTransBitmap;
@@ -369,10 +366,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause)
stretch_buf_mask = m_Storer.GetBitmap()->m_pAlphaMask->GetBuffer();
}
int stretch_pitch = m_Storer.GetBitmap()->GetPitch();
- CFX_DIBitmap* pTransformed = FX_NEW CFX_DIBitmap;
- if (!pTransformed) {
- return FALSE;
- }
+ CFX_DIBitmap* pTransformed = new CFX_DIBitmap;
FXDIB_Format transformF = _GetTransformedFormat(m_Stretcher.m_pSource);
if (!pTransformed->Create(m_ResultWidth, m_ResultHeight, transformF)) {
delete pTransformed;
« no previous file with comments | « core/src/fxge/dib/fx_dib_main.cpp ('k') | core/src/fxge/skia/fx_skia_device.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698