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/fxcodec/codec/ccodec_progressivedecoder.h" | 7 #include "core/fxcodec/codec/ccodec_progressivedecoder.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1288 } | 1288 } |
1289 return true; | 1289 return true; |
1290 } | 1290 } |
1291 default: | 1291 default: |
1292 m_status = FXCODEC_STATUS_ERR_FORMAT; | 1292 m_status = FXCODEC_STATUS_ERR_FORMAT; |
1293 return false; | 1293 return false; |
1294 } | 1294 } |
1295 } | 1295 } |
1296 | 1296 |
1297 FXCODEC_STATUS CCodec_ProgressiveDecoder::LoadImageInfo( | 1297 FXCODEC_STATUS CCodec_ProgressiveDecoder::LoadImageInfo( |
1298 IFX_SeekableReadStream* pFile, | 1298 const CFX_RetainPtr<IFX_SeekableReadStream>& pFile, |
1299 FXCODEC_IMAGE_TYPE imageType, | 1299 FXCODEC_IMAGE_TYPE imageType, |
1300 CFX_DIBAttribute* pAttribute, | 1300 CFX_DIBAttribute* pAttribute, |
1301 bool bSkipImageTypeCheck) { | 1301 bool bSkipImageTypeCheck) { |
1302 switch (m_status) { | 1302 switch (m_status) { |
1303 case FXCODEC_STATUS_FRAME_READY: | 1303 case FXCODEC_STATUS_FRAME_READY: |
1304 case FXCODEC_STATUS_FRAME_TOBECONTINUE: | 1304 case FXCODEC_STATUS_FRAME_TOBECONTINUE: |
1305 case FXCODEC_STATUS_DECODE_READY: | 1305 case FXCODEC_STATUS_DECODE_READY: |
1306 case FXCODEC_STATUS_DECODE_TOBECONTINUE: | 1306 case FXCODEC_STATUS_DECODE_TOBECONTINUE: |
1307 return FXCODEC_STATUS_ERROR; | 1307 return FXCODEC_STATUS_ERROR; |
1308 default: | 1308 default: |
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2365 return m_status; | 2365 return m_status; |
2366 } | 2366 } |
2367 default: | 2367 default: |
2368 return FXCODEC_STATUS_ERROR; | 2368 return FXCODEC_STATUS_ERROR; |
2369 } | 2369 } |
2370 } | 2370 } |
2371 | 2371 |
2372 CCodec_ProgressiveDecoder* CCodec_ModuleMgr::CreateProgressiveDecoder() { | 2372 CCodec_ProgressiveDecoder* CCodec_ModuleMgr::CreateProgressiveDecoder() { |
2373 return new CCodec_ProgressiveDecoder(this); | 2373 return new CCodec_ProgressiveDecoder(this); |
2374 } | 2374 } |
OLD | NEW |