| 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 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 { | 672 { |
| 673 m_pScanline = NULL; | 673 m_pScanline = NULL; |
| 674 m_pStretchEngine = NULL; | 674 m_pStretchEngine = NULL; |
| 675 m_pMaskScanline = NULL; | 675 m_pMaskScanline = NULL; |
| 676 } | 676 } |
| 677 CFX_ImageStretcher::~CFX_ImageStretcher() | 677 CFX_ImageStretcher::~CFX_ImageStretcher() |
| 678 { | 678 { |
| 679 if (m_pScanline) { | 679 if (m_pScanline) { |
| 680 FX_Free(m_pScanline); | 680 FX_Free(m_pScanline); |
| 681 } | 681 } |
| 682 if (m_pStretchEngine) { | 682 delete m_pStretchEngine; |
| 683 delete m_pStretchEngine; | |
| 684 } | |
| 685 if (m_pMaskScanline) { | 683 if (m_pMaskScanline) { |
| 686 FX_Free(m_pMaskScanline); | 684 FX_Free(m_pMaskScanline); |
| 687 } | 685 } |
| 688 } | 686 } |
| 689 FXDIB_Format _GetStretchedFormat(const CFX_DIBSource* pSrc) | 687 FXDIB_Format _GetStretchedFormat(const CFX_DIBSource* pSrc) |
| 690 { | 688 { |
| 691 FXDIB_Format format = pSrc->GetFormat(); | 689 FXDIB_Format format = pSrc->GetFormat(); |
| 692 if (format == FXDIB_1bppMask) { | 690 if (format == FXDIB_1bppMask) { |
| 693 format = FXDIB_8bppMask; | 691 format = FXDIB_8bppMask; |
| 694 } else if (format == FXDIB_1bppRgb) { | 692 } else if (format == FXDIB_1bppRgb) { |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 return TRUE; | 829 return TRUE; |
| 832 } | 830 } |
| 833 m_pSource->DownSampleScanline(src_y, m_pScanline, m_DestBPP, m_DestWidth
, m_bFlipX, m_ClipRect.left, result_width); | 831 m_pSource->DownSampleScanline(src_y, m_pScanline, m_DestBPP, m_DestWidth
, m_bFlipX, m_ClipRect.left, result_width); |
| 834 if (m_pMaskScanline) { | 832 if (m_pMaskScanline) { |
| 835 m_pSource->m_pAlphaMask->DownSampleScanline(src_y, m_pMaskScanline,
1, m_DestWidth, m_bFlipX, m_ClipRect.left, result_width); | 833 m_pSource->m_pAlphaMask->DownSampleScanline(src_y, m_pMaskScanline,
1, m_DestWidth, m_bFlipX, m_ClipRect.left, result_width); |
| 836 } | 834 } |
| 837 m_pDest->ComposeScanline(dest_y, m_pScanline, m_pMaskScanline); | 835 m_pDest->ComposeScanline(dest_y, m_pScanline, m_pMaskScanline); |
| 838 } | 836 } |
| 839 return FALSE; | 837 return FALSE; |
| 840 } | 838 } |
| OLD | NEW |