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/include/fxcodec/fx_codec.h" | 7 #include "core/include/fxcodec/fx_codec.h" |
8 #include "core/include/fxge/fx_dib.h" | 8 #include "core/include/fxge/fx_dib.h" |
9 #include "core/include/fxge/fx_ge.h" | 9 #include "core/include/fxge/fx_ge.h" |
10 | 10 |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 const CFX_DIBSource* pSrcBitmap, | 615 const CFX_DIBSource* pSrcBitmap, |
616 int src_left, | 616 int src_left, |
617 int src_top, | 617 int src_top, |
618 FX_DWORD* dst_plt, | 618 FX_DWORD* dst_plt, |
619 void* pIccTransform) { | 619 void* pIccTransform) { |
620 #ifdef PDF_ENABLE_XFA | 620 #ifdef PDF_ENABLE_XFA |
621 ICodec_IccModule* pIccModule = NULL; | 621 ICodec_IccModule* pIccModule = NULL; |
622 if (pIccTransform) { | 622 if (pIccTransform) { |
623 pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule(); | 623 pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule(); |
624 } | 624 } |
625 #endif | 625 #endif // PDF_ENABLE_XFA |
626 FX_BOOL ret = _ConvertBuffer_Rgb2PltRgb8_NoTransform( | 626 FX_BOOL ret = _ConvertBuffer_Rgb2PltRgb8_NoTransform( |
627 dest_buf, dest_pitch, width, height, pSrcBitmap, src_left, src_top, | 627 dest_buf, dest_pitch, width, height, pSrcBitmap, src_left, src_top, |
628 dst_plt); | 628 dst_plt); |
629 if (ret && pIccTransform) { | 629 if (ret && pIccTransform) { |
630 ICodec_IccModule* pIccModule = | 630 ICodec_IccModule* pIccModule = |
631 CFX_GEModule::Get()->GetCodecModule()->GetIccModule(); | 631 CFX_GEModule::Get()->GetCodecModule()->GetIccModule(); |
632 for (int i = 0; i < 256; i++) { | 632 for (int i = 0; i < 256; i++) { |
633 FX_ARGB* plt = dst_plt + i; | 633 FX_ARGB* plt = dst_plt + i; |
634 FX_ARGB plt_entry = FXARGB_TODIB(*plt); | 634 FX_ARGB plt_entry = FXARGB_TODIB(*plt); |
635 pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&plt_entry, | 635 pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&plt_entry, |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1224 if (!m_bExtBuf) { | 1224 if (!m_bExtBuf) { |
1225 FX_Free(m_pBuffer); | 1225 FX_Free(m_pBuffer); |
1226 } | 1226 } |
1227 m_bExtBuf = FALSE; | 1227 m_bExtBuf = FALSE; |
1228 m_pBuffer = dest_buf; | 1228 m_pBuffer = dest_buf; |
1229 m_bpp = (uint8_t)dest_format; | 1229 m_bpp = (uint8_t)dest_format; |
1230 m_AlphaFlag = (uint8_t)(dest_format >> 8); | 1230 m_AlphaFlag = (uint8_t)(dest_format >> 8); |
1231 m_Pitch = dest_pitch; | 1231 m_Pitch = dest_pitch; |
1232 return TRUE; | 1232 return TRUE; |
1233 } | 1233 } |
OLD | NEW |