diff options
author | Lei Zhang <thestig@chromium.org> | 2015-10-02 10:28:27 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-10-02 10:28:27 -0700 |
commit | db12c167d3613c9a73b28cac75e37779dbc680e0 (patch) | |
tree | dbf281ba95a08a30fe21703ee6af3a309787c74f /core/src/fxge/win32 | |
parent | 421b4612439ee3a81d675b542038c6c3ff25e977 (diff) | |
download | pdfium-db12c167d3613c9a73b28cac75e37779dbc680e0.tar.xz |
XFA: Remove tests for new in fxge and fpdfsdk.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1378303002 .
Diffstat (limited to 'core/src/fxge/win32')
-rw-r--r-- | core/src/fxge/win32/fx_win32_device.cpp | 12 | ||||
-rw-r--r-- | core/src/fxge/win32/fx_win32_dib.cpp | 14 | ||||
-rw-r--r-- | core/src/fxge/win32/fx_win32_dwrite.cpp | 3 | ||||
-rw-r--r-- | core/src/fxge/win32/fx_win32_gdipext.cpp | 6 |
4 files changed, 0 insertions, 35 deletions
diff --git a/core/src/fxge/win32/fx_win32_device.cpp b/core/src/fxge/win32/fx_win32_device.cpp index a0ccb83ae4..2db35f7f68 100644 --- a/core/src/fxge/win32/fx_win32_device.cpp +++ b/core/src/fxge/win32/fx_win32_device.cpp @@ -410,9 +410,6 @@ IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault(const char** pUnused) { } void CFX_GEModule::InitPlatform() { CWin32Platform* pPlatformData = new CWin32Platform; - if (!pPlatformData) { - return; - } OSVERSIONINFO ver; ver.dwOSVersionInfoSize = sizeof(ver); GetVersionEx(&ver); @@ -1254,9 +1251,6 @@ CFX_WindowsDevice::CFX_WindowsDevice(HDC hDC, m_psLevel = psLevel; if (bForcePSOutput) { IFX_RenderDeviceDriver* pDriver = new CPSPrinterDriver; - if (!pDriver) { - return; - } ((CPSPrinterDriver*)pDriver)->Init(hDC, psLevel, bCmykOutput); SetDeviceDriver(pDriver); return; @@ -1303,17 +1297,11 @@ CFX_WinBitmapDevice::CFX_WinBitmapDevice(int width, return; } CFX_DIBitmap* pBitmap = new CFX_DIBitmap; - if (!pBitmap) { - return; - } pBitmap->Create(width, height, format, pBuffer); SetBitmap(pBitmap); m_hDC = ::CreateCompatibleDC(NULL); m_hOldBitmap = (HBITMAP)SelectObject(m_hDC, m_hBitmap); IFX_RenderDeviceDriver* pDriver = new CGdiDisplayDriver(m_hDC); - if (!pDriver) { - return; - } SetDeviceDriver(pDriver); } CFX_WinBitmapDevice::~CFX_WinBitmapDevice() { diff --git a/core/src/fxge/win32/fx_win32_dib.cpp b/core/src/fxge/win32/fx_win32_dib.cpp index f6230f6ce0..b1ffe8080d 100644 --- a/core/src/fxge/win32/fx_win32_dib.cpp +++ b/core/src/fxge/win32/fx_win32_dib.cpp @@ -60,9 +60,6 @@ CFX_DIBitmap* _FX_WindowsDIB_LoadFromBuf(BITMAPINFO* pbmi, } int pitch = (width * pbmi->bmiHeader.biBitCount + 31) / 32 * 4; CFX_DIBitmap* pBitmap = new CFX_DIBitmap; - if (!pBitmap) { - return NULL; - } FXDIB_Format format = bAlpha ? (FXDIB_Format)(pbmi->bmiHeader.biBitCount + 0x200) : (FXDIB_Format)pbmi->bmiHeader.biBitCount; @@ -132,10 +129,6 @@ CFX_DIBitmap* CFX_WindowsDIB::LoadFromFile(const FX_WCHAR* filename) { int width, height; GetBitmapSize(hBitmap, width, height); CFX_DIBitmap* pDIBitmap = new CFX_DIBitmap; - if (!pDIBitmap) { - DeleteDC(hDC); - return NULL; - } if (!pDIBitmap->Create(width, height, FXDIB_Rgb)) { delete pDIBitmap; DeleteDC(hDC); @@ -169,10 +162,6 @@ CFX_DIBitmap* CFX_WindowsDIB::LoadDIBitmap(WINDIB_Open_Args_ args) { int width, height; GetBitmapSize(hBitmap, width, height); CFX_DIBitmap* pDIBitmap = new CFX_DIBitmap; - if (!pDIBitmap) { - DeleteDC(hDC); - return NULL; - } if (!pDIBitmap->Create(width, height, FXDIB_Rgb)) { delete pDIBitmap; DeleteDC(hDC); @@ -205,9 +194,6 @@ CFX_DIBitmap* CFX_WindowsDIB::LoadFromDDB(HDC hDC, bmih.biHeight = -height; bmih.biCompression = BI_RGB; CFX_DIBitmap* pDIBitmap = new CFX_DIBitmap; - if (!pDIBitmap) { - return NULL; - } int ret = 0; if (bmih.biBitCount == 1 || bmih.biBitCount == 8) { int size = sizeof(BITMAPINFOHEADER) + 8; diff --git a/core/src/fxge/win32/fx_win32_dwrite.cpp b/core/src/fxge/win32/fx_win32_dwrite.cpp index f4f6d91fbc..845eb14576 100644 --- a/core/src/fxge/win32/fx_win32_dwrite.cpp +++ b/core/src/fxge/win32/fx_win32_dwrite.cpp @@ -337,9 +337,6 @@ HRESULT STDMETHODCALLTYPE CDwFontFileLoader::CreateStreamFromKey( *fontFileStream = NULL; CDwFontFileStream* stream = new CDwFontFileStream(fontFileReferenceKey, fontFileReferenceKeySize); - if (stream == NULL) { - return E_OUTOFMEMORY; - } if (!stream->IsInitialized()) { delete stream; return E_FAIL; diff --git a/core/src/fxge/win32/fx_win32_gdipext.cpp b/core/src/fxge/win32/fx_win32_gdipext.cpp index 9dbc7b4289..ce65a26301 100644 --- a/core/src/fxge/win32/fx_win32_gdipext.cpp +++ b/core/src/fxge/win32/fx_win32_gdipext.cpp @@ -476,9 +476,6 @@ static CFX_DIBitmap* _StretchMonoToGray(int dest_width, int result_height = pClipRect->Height(); int result_pitch = (result_width + 3) / 4 * 4; CFX_DIBitmap* pStretched = new CFX_DIBitmap; - if (!pStretched) { - return NULL; - } if (!pStretched->Create(result_width, result_height, FXDIB_8bppRgb)) { delete pStretched; return NULL; @@ -1417,9 +1414,6 @@ static PREVIEW3_DIBITMAP* LoadDIBitmap(WINDIB_Open_Args_ args) { return NULL; } pStream = new GpStream; - if (!pStream) { - return NULL; - } pStream->Write(args.memory_base, (ULONG)args.memory_size, NULL); status = CallFunc(GdipCreateBitmapFromStreamICM)(pStream, &pBitmap); } |