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_dib.h" | 7 #include "../../../include/fxge/fx_dib.h" |
8 #include "../../../include/fxcodec/fx_codec.h" | 8 #include "../../../include/fxcodec/fx_codec.h" |
9 #include "fx_codec_progress.h" | 9 #include "fx_codec_progress.h" |
10 void CFXCODEC_WeightTable::Calc(int dest_len, | 10 void CFXCODEC_WeightTable::Calc(int dest_len, |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
709 *byte_ptr = pCodec->m_GifBgIndex; | 709 *byte_ptr = pCodec->m_GifBgIndex; |
710 } | 710 } |
711 byte_ptr++; | 711 byte_ptr++; |
712 } | 712 } |
713 } | 713 } |
714 int32_t pal_index = pCodec->m_GifBgIndex; | 714 int32_t pal_index = pCodec->m_GifBgIndex; |
715 if (pCodec->m_GifTransIndex != -1 && pCodec->m_pDeviceBitmap->HasAlpha()) { | 715 if (pCodec->m_GifTransIndex != -1 && pCodec->m_pDeviceBitmap->HasAlpha()) { |
716 pal_index = pCodec->m_GifTransIndex; | 716 pal_index = pCodec->m_GifTransIndex; |
717 } | 717 } |
718 FXSYS_memset(pCodec->m_pDecodeBuf, pal_index, pCodec->m_SrcWidth); | 718 FXSYS_memset(pCodec->m_pDecodeBuf, pal_index, pCodec->m_SrcWidth); |
719 FX_BOOL bLastPass = ((row_num % 2) == 1) ? TRUE : FALSE; | 719 FX_BOOL bLastPass = ((row_num % 2) == 1); |
Tom Sepez
2015/10/19 20:16:10
nit: overparenthesized.
Lei Zhang
2015/10/20 00:41:43
Done.
| |
720 int32_t line = row_num + pCodec->m_GifFrameRect.top; | 720 int32_t line = row_num + pCodec->m_GifFrameRect.top; |
721 int32_t left = pCodec->m_GifFrameRect.left; | 721 int32_t left = pCodec->m_GifFrameRect.left; |
722 FXSYS_memcpy(pCodec->m_pDecodeBuf + left, row_buf, img_width); | 722 FXSYS_memcpy(pCodec->m_pDecodeBuf + left, row_buf, img_width); |
723 int src_top = pCodec->m_clipBox.top; | 723 int src_top = pCodec->m_clipBox.top; |
724 int src_bottom = pCodec->m_clipBox.bottom; | 724 int src_bottom = pCodec->m_clipBox.bottom; |
725 int des_top = pCodec->m_startY; | 725 int des_top = pCodec->m_startY; |
726 int src_hei = pCodec->m_clipBox.Height(); | 726 int src_hei = pCodec->m_clipBox.Height(); |
727 int des_hei = pCodec->m_sizeY; | 727 int des_hei = pCodec->m_sizeY; |
728 if (line >= src_top && line < src_bottom) { | 728 if (line >= src_top && line < src_bottom) { |
729 double scale_y = (double)des_hei / (double)src_hei; | 729 double scale_y = (double)des_hei / (double)src_hei; |
(...skipping 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2343 } | 2343 } |
2344 } break; | 2344 } break; |
2345 default: | 2345 default: |
2346 break; | 2346 break; |
2347 } | 2347 } |
2348 return FXCODEC_STATUS_ERROR; | 2348 return FXCODEC_STATUS_ERROR; |
2349 } | 2349 } |
2350 ICodec_ProgressiveDecoder* CCodec_ModuleMgr::CreateProgressiveDecoder() { | 2350 ICodec_ProgressiveDecoder* CCodec_ModuleMgr::CreateProgressiveDecoder() { |
2351 return new CCodec_ProgressiveDecoder(this); | 2351 return new CCodec_ProgressiveDecoder(this); |
2352 } | 2352 } |
OLD | NEW |