OLD | NEW |
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 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 FX_BOOL CFX_ImageStretcher::Continue(IFX_Pause* pPause) { | 845 FX_BOOL CFX_ImageStretcher::Continue(IFX_Pause* pPause) { |
846 if (m_Flags & FXDIB_DOWNSAMPLE) { | 846 if (m_Flags & FXDIB_DOWNSAMPLE) { |
847 return ContinueQuickStretch(pPause); | 847 return ContinueQuickStretch(pPause); |
848 } | 848 } |
849 return ContinueStretch(pPause); | 849 return ContinueStretch(pPause); |
850 } | 850 } |
851 #define MAX_PROGRESSIVE_STRETCH_PIXELS 1000000 | 851 #define MAX_PROGRESSIVE_STRETCH_PIXELS 1000000 |
852 FX_BOOL CFX_ImageStretcher::StartStretch() { | 852 FX_BOOL CFX_ImageStretcher::StartStretch() { |
853 m_pStretchEngine = | 853 m_pStretchEngine = |
854 new CStretchEngine(m_pDest, m_DestFormat, m_DestWidth, m_DestHeight, | 854 new CStretchEngine(m_pDest, m_DestFormat, m_DestWidth, m_DestHeight, |
855 m_ClipRect, m_pSource, m_Flags); | 855 m_ClipRect, m_pSource, m_Flags); |
856 if (!m_pStretchEngine) { | 856 if (!m_pStretchEngine) { |
857 return FALSE; | 857 return FALSE; |
858 } | 858 } |
859 m_pStretchEngine->StartStretchHorz(); | 859 m_pStretchEngine->StartStretchHorz(); |
860 if (m_pSource->GetWidth() * m_pSource->GetHeight() < | 860 if (m_pSource->GetWidth() * m_pSource->GetHeight() < |
861 MAX_PROGRESSIVE_STRETCH_PIXELS) { | 861 MAX_PROGRESSIVE_STRETCH_PIXELS) { |
862 m_pStretchEngine->Continue(NULL); | 862 m_pStretchEngine->Continue(NULL); |
863 return FALSE; | 863 return FALSE; |
864 } | 864 } |
865 return TRUE; | 865 return TRUE; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
927 m_bFlipX, m_ClipRect.left, result_width); | 927 m_bFlipX, m_ClipRect.left, result_width); |
928 if (m_pMaskScanline) { | 928 if (m_pMaskScanline) { |
929 m_pSource->m_pAlphaMask->DownSampleScanline( | 929 m_pSource->m_pAlphaMask->DownSampleScanline( |
930 src_y, m_pMaskScanline, 1, m_DestWidth, m_bFlipX, m_ClipRect.left, | 930 src_y, m_pMaskScanline, 1, m_DestWidth, m_bFlipX, m_ClipRect.left, |
931 result_width); | 931 result_width); |
932 } | 932 } |
933 m_pDest->ComposeScanline(dest_y, m_pScanline, m_pMaskScanline); | 933 m_pDest->ComposeScanline(dest_y, m_pScanline, m_pMaskScanline); |
934 } | 934 } |
935 return FALSE; | 935 return FALSE; |
936 } | 936 } |
OLD | NEW |