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 "core/src/fpdfapi/fpdf_render/render_int.h" | 7 #include "core/src/fpdfapi/fpdf_render/render_int.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1529 } | 1529 } |
1530 | 1530 |
1531 FX_BOOL CPDF_DIBSource::TransMask() const { | 1531 FX_BOOL CPDF_DIBSource::TransMask() const { |
1532 return m_bLoadMask && m_GroupFamily == PDFCS_DEVICECMYK && | 1532 return m_bLoadMask && m_GroupFamily == PDFCS_DEVICECMYK && |
1533 m_Family == PDFCS_DEVICECMYK; | 1533 m_Family == PDFCS_DEVICECMYK; |
1534 } | 1534 } |
1535 | 1535 |
1536 void CPDF_DIBSource::SetDownSampleSize(int dest_width, int dest_height) { | 1536 void CPDF_DIBSource::SetDownSampleSize(int dest_width, int dest_height) { |
1537 if (m_pDecoder) { | 1537 if (m_pDecoder) { |
1538 m_pDecoder->DownScale(dest_width, dest_height); | 1538 m_pDecoder->DownScale(dest_width, dest_height); |
1539 this->m_Width = m_pDecoder->GetWidth(); | 1539 m_Width = m_pDecoder->GetWidth(); |
1540 this->m_Height = m_pDecoder->GetHeight(); | 1540 m_Height = m_pDecoder->GetHeight(); |
1541 } | 1541 } |
1542 } | 1542 } |
1543 | 1543 |
1544 void CPDF_DIBSource::ClearImageData() { | 1544 void CPDF_DIBSource::ClearImageData() { |
1545 if (m_pDecoder) { | 1545 if (m_pDecoder) { |
1546 m_pDecoder->ClearImageData(); | 1546 m_pDecoder->ClearImageData(); |
1547 } | 1547 } |
1548 } | 1548 } |
1549 | 1549 |
1550 CPDF_ImageLoaderHandle::CPDF_ImageLoaderHandle() { | 1550 CPDF_ImageLoaderHandle::CPDF_ImageLoaderHandle() { |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1641 IFX_Pause* pPause) { | 1641 IFX_Pause* pPause) { |
1642 return LoadHandle->Continue(pPause); | 1642 return LoadHandle->Continue(pPause); |
1643 } | 1643 } |
1644 | 1644 |
1645 CPDF_ImageLoader::~CPDF_ImageLoader() { | 1645 CPDF_ImageLoader::~CPDF_ImageLoader() { |
1646 if (!m_bCached) { | 1646 if (!m_bCached) { |
1647 delete m_pBitmap; | 1647 delete m_pBitmap; |
1648 delete m_pMask; | 1648 delete m_pMask; |
1649 } | 1649 } |
1650 } | 1650 } |
OLD | NEW |