| 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_ge.h" | 7 #include "../../../include/fxge/fx_ge.h" |
| 8 #include "../../../include/fxcodec/fx_codec.h" | 8 #include "../../../include/fxcodec/fx_codec.h" |
| 9 #include "../../../include/fpdfapi/fpdf_module.h" | 9 #include "../../../include/fpdfapi/fpdf_module.h" |
| 10 #include "../../../include/fpdfapi/fpdf_render.h" | 10 #include "../../../include/fpdfapi/fpdf_render.h" |
| (...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 return; | 985 return; |
| 986 } else if (m_bpc == 8) { | 986 } else if (m_bpc == 8) { |
| 987 if (m_nComponents == m_pColorSpace->CountComponents()) | 987 if (m_nComponents == m_pColorSpace->CountComponents()) |
| 988 m_pColorSpace->TranslateImageLine(dest_scan, src_scan, m_Width,
m_Width, m_Height, | 988 m_pColorSpace->TranslateImageLine(dest_scan, src_scan, m_Width,
m_Width, m_Height, |
| 989 m_bLoadMask && m_GroupFamily =
= PDFCS_DEVICECMYK && m_Family == PDFCS_DEVICECMYK); | 989 m_bLoadMask && m_GroupFamily =
= PDFCS_DEVICECMYK && m_Family == PDFCS_DEVICECMYK); |
| 990 return; | 990 return; |
| 991 } | 991 } |
| 992 } | 992 } |
| 993 CFX_FixedBufGrow<FX_FLOAT, 16> color_values1(m_nComponents); | 993 CFX_FixedBufGrow<FX_FLOAT, 16> color_values1(m_nComponents); |
| 994 FX_FLOAT* color_values = color_values1; | 994 FX_FLOAT* color_values = color_values1; |
| 995 FX_FLOAT R, G, B; | 995 FX_FLOAT R = 0.0f, G = 0.0f, B = 0.0f; |
| 996 if (m_bpc == 8) { | 996 if (m_bpc == 8) { |
| 997 int src_byte_pos = 0; | 997 int src_byte_pos = 0; |
| 998 int dest_byte_pos = 0; | 998 int dest_byte_pos = 0; |
| 999 for (int column = 0; column < m_Width; column ++) { | 999 for (int column = 0; column < m_Width; column ++) { |
| 1000 for (FX_DWORD color = 0; color < m_nComponents; color ++) { | 1000 for (FX_DWORD color = 0; color < m_nComponents; color ++) { |
| 1001 int data = src_scan[src_byte_pos ++]; | 1001 int data = src_scan[src_byte_pos ++]; |
| 1002 color_values[color] = m_pCompData[color].m_DecodeMin + | 1002 color_values[color] = m_pCompData[color].m_DecodeMin + |
| 1003 m_pCompData[color].m_DecodeStep * data; | 1003 m_pCompData[color].m_DecodeStep * data; |
| 1004 } | 1004 } |
| 1005 if (m_bLoadMask && m_GroupFamily == PDFCS_DEVICECMYK && m_Family ==
PDFCS_DEVICECMYK) { | 1005 if (m_bLoadMask && m_GroupFamily == PDFCS_DEVICECMYK && m_Family ==
PDFCS_DEVICECMYK) { |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1507 if (!m_bCached) { | 1507 if (!m_bCached) { |
| 1508 if (m_pBitmap) { | 1508 if (m_pBitmap) { |
| 1509 delete m_pBitmap; | 1509 delete m_pBitmap; |
| 1510 m_pBitmap = NULL; | 1510 m_pBitmap = NULL; |
| 1511 } | 1511 } |
| 1512 if (m_pMask) { | 1512 if (m_pMask) { |
| 1513 delete m_pMask; | 1513 delete m_pMask; |
| 1514 } | 1514 } |
| 1515 } | 1515 } |
| 1516 } | 1516 } |
| OLD | NEW |