Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: core/src/fxcodec/codec/fx_codec_progress.cpp

Issue 1409323003: XFA: Remove cond ? TRUE : FALSE. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: address comments Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | xfa/src/fdp/src/fde/fde_gedevice.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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;
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
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 }
OLDNEW
« no previous file with comments | « no previous file | xfa/src/fdp/src/fde/fde_gedevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698