| 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/fpdfapi/page/pageint.h" | 7 #include "core/fpdfapi/page/pageint.h" |
| 8 | 8 |
| 9 #include <limits.h> | 9 #include <limits.h> |
| 10 | 10 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 dest_buf, dest_size); | 100 dest_buf, dest_size); |
| 101 } | 101 } |
| 102 if (decoder == "LZWDecode" || decoder == "LZW") { | 102 if (decoder == "LZWDecode" || decoder == "LZW") { |
| 103 return FPDFAPI_FlateOrLZWDecode(TRUE, src_buf, limit, pParam, 0, dest_buf, | 103 return FPDFAPI_FlateOrLZWDecode(TRUE, src_buf, limit, pParam, 0, dest_buf, |
| 104 dest_size); | 104 dest_size); |
| 105 } | 105 } |
| 106 if (decoder == "DCTDecode" || decoder == "DCT") { | 106 if (decoder == "DCTDecode" || decoder == "DCT") { |
| 107 CCodec_ScanlineDecoder* pDecoder = | 107 CCodec_ScanlineDecoder* pDecoder = |
| 108 CPDF_ModuleMgr::Get()->GetJpegModule()->CreateDecoder( | 108 CPDF_ModuleMgr::Get()->GetJpegModule()->CreateDecoder( |
| 109 src_buf, limit, width, height, 0, | 109 src_buf, limit, width, height, 0, |
| 110 pParam ? pParam->GetIntegerFor("ColorTransform", 1) : 1); | 110 !pParam || pParam->GetIntegerFor("ColorTransform", 1)); |
| 111 return DecodeAllScanlines(pDecoder, dest_buf, dest_size); | 111 return DecodeAllScanlines(pDecoder, dest_buf, dest_size); |
| 112 } | 112 } |
| 113 if (decoder == "RunLengthDecode" || decoder == "RL") { | 113 if (decoder == "RunLengthDecode" || decoder == "RL") { |
| 114 return RunLengthDecode(src_buf, limit, dest_buf, dest_size); | 114 return RunLengthDecode(src_buf, limit, dest_buf, dest_size); |
| 115 } | 115 } |
| 116 dest_size = 0; | 116 dest_size = 0; |
| 117 dest_buf = 0; | 117 dest_buf = 0; |
| 118 return (uint32_t)-1; | 118 return (uint32_t)-1; |
| 119 } | 119 } |
| 120 | 120 |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 } | 837 } |
| 838 m_Status = Done; | 838 m_Status = Done; |
| 839 return; | 839 return; |
| 840 } | 840 } |
| 841 steps++; | 841 steps++; |
| 842 if (pPause && pPause->NeedToPauseNow()) { | 842 if (pPause && pPause->NeedToPauseNow()) { |
| 843 break; | 843 break; |
| 844 } | 844 } |
| 845 } | 845 } |
| 846 } | 846 } |
| OLD | NEW |