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

Side by Side Diff: core/src/fxge/dib/fx_dib_engine.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 unified diff | Download patch
« no previous file with comments | « core/src/fxge/dib/fx_dib_convert.cpp ('k') | core/src/fxge/dib/fx_dib_main.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../../../include/fxge/fx_dib.h" 7 #include "../../../include/fxge/fx_dib.h"
8 #include "../../../include/fxge/fx_ge.h" 8 #include "../../../include/fxge/fx_ge.h"
9 #include "dib_int.h" 9 #include "dib_int.h"
10 #include <limits.h> 10 #include <limits.h>
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 { 758 {
759 if (m_Flags & FXDIB_DOWNSAMPLE) { 759 if (m_Flags & FXDIB_DOWNSAMPLE) {
760 return ContinueQuickStretch(pPause); 760 return ContinueQuickStretch(pPause);
761 } else { 761 } else {
762 return ContinueStretch(pPause); 762 return ContinueStretch(pPause);
763 } 763 }
764 } 764 }
765 #define MAX_PROGRESSIVE_STRETCH_PIXELS 1000000 765 #define MAX_PROGRESSIVE_STRETCH_PIXELS 1000000
766 FX_BOOL CFX_ImageStretcher::StartStretch() 766 FX_BOOL CFX_ImageStretcher::StartStretch()
767 { 767 {
768 m_pStretchEngine = FX_NEW CStretchEngine(m_pDest, m_DestFormat, m_DestWidth, m_DestHeight, m_ClipRect, m_pSource, m_Flags); 768 m_pStretchEngine = new CStretchEngine(m_pDest, m_DestFormat, m_DestWidth, m_ DestHeight, m_ClipRect, m_pSource, m_Flags);
769 if (!m_pStretchEngine) {
770 return FALSE;
771 }
772 m_pStretchEngine->StartStretchHorz(); 769 m_pStretchEngine->StartStretchHorz();
773 if (m_pSource->GetWidth() * m_pSource->GetHeight() < MAX_PROGRESSIVE_STRETCH _PIXELS) { 770 if (m_pSource->GetWidth() * m_pSource->GetHeight() < MAX_PROGRESSIVE_STRETCH _PIXELS) {
774 m_pStretchEngine->Continue(NULL); 771 m_pStretchEngine->Continue(NULL);
775 return FALSE; 772 return FALSE;
776 } 773 }
777 return TRUE; 774 return TRUE;
778 } 775 }
779 FX_BOOL CFX_ImageStretcher::ContinueStretch(IFX_Pause* pPause) 776 FX_BOOL CFX_ImageStretcher::ContinueStretch(IFX_Pause* pPause)
780 { 777 {
781 if (m_pStretchEngine == NULL) { 778 if (m_pStretchEngine == NULL) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 return TRUE; 840 return TRUE;
844 } 841 }
845 m_pSource->DownSampleScanline(src_y, m_pScanline, m_DestBPP, m_DestWidth , m_bFlipX, m_ClipRect.left, result_width); 842 m_pSource->DownSampleScanline(src_y, m_pScanline, m_DestBPP, m_DestWidth , m_bFlipX, m_ClipRect.left, result_width);
846 if (m_pMaskScanline) { 843 if (m_pMaskScanline) {
847 m_pSource->m_pAlphaMask->DownSampleScanline(src_y, m_pMaskScanline, 1, m_DestWidth, m_bFlipX, m_ClipRect.left, result_width); 844 m_pSource->m_pAlphaMask->DownSampleScanline(src_y, m_pMaskScanline, 1, m_DestWidth, m_bFlipX, m_ClipRect.left, result_width);
848 } 845 }
849 m_pDest->ComposeScanline(dest_y, m_pScanline, m_pMaskScanline); 846 m_pDest->ComposeScanline(dest_y, m_pScanline, m_pMaskScanline);
850 } 847 }
851 return FALSE; 848 return FALSE;
852 } 849 }
OLDNEW
« no previous file with comments | « core/src/fxge/dib/fx_dib_convert.cpp ('k') | core/src/fxge/dib/fx_dib_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698