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

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

Issue 1084303002: Replace FX_NEW with new, remote tests from fxcodec (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 8 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 | « core/src/fxcodec/codec/fx_codec.cpp ('k') | core/src/fxcodec/codec/fx_codec_flate.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/fxcodec/fx_codec.h" 7 #include "../../../include/fxcodec/fx_codec.h"
8 #include "codec_int.h" 8 #include "codec_int.h"
9 const FX_BYTE OneLeadPos[256] = { 9 const FX_BYTE OneLeadPos[256] = {
10 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 10 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 } 987 }
988 FX_BOOL CCodec_FaxModule::Encode(FX_LPCBYTE src_buf, int width, int height, int pitch, FX_LPBYTE& dest_buf, FX_DWORD& dest_size) 988 FX_BOOL CCodec_FaxModule::Encode(FX_LPCBYTE src_buf, int width, int height, int pitch, FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
989 { 989 {
990 CCodec_FaxEncoder encoder(src_buf, width, height, pitch); 990 CCodec_FaxEncoder encoder(src_buf, width, height, pitch);
991 encoder.Encode(dest_buf, dest_size); 991 encoder.Encode(dest_buf, dest_size);
992 return TRUE; 992 return TRUE;
993 } 993 }
994 ICodec_ScanlineDecoder* CCodec_FaxModule::CreateDecoder(FX_LPCBYTE src_buf, FX_D WORD src_size, int width, int height, 994 ICodec_ScanlineDecoder* CCodec_FaxModule::CreateDecoder(FX_LPCBYTE src_buf, FX_D WORD src_size, int width, int height,
995 int K, FX_BOOL EndOfLine, FX_BOOL EncodedByteAlign, FX_BOOL BlackIs1, in t Columns, int Rows) 995 int K, FX_BOOL EndOfLine, FX_BOOL EncodedByteAlign, FX_BOOL BlackIs1, in t Columns, int Rows)
996 { 996 {
997 CCodec_FaxDecoder* pDecoder = FX_NEW CCodec_FaxDecoder; 997 CCodec_FaxDecoder* pDecoder = new CCodec_FaxDecoder;
998 if (pDecoder == NULL) {
999 return NULL;
1000 }
1001 pDecoder->Create(src_buf, src_size, width, height, K, EndOfLine, EncodedByte Align, BlackIs1, Columns, Rows); 998 pDecoder->Create(src_buf, src_size, width, height, K, EndOfLine, EncodedByte Align, BlackIs1, Columns, Rows);
1002 return pDecoder; 999 return pDecoder;
1003 } 1000 }
OLDNEW
« no previous file with comments | « core/src/fxcodec/codec/fx_codec.cpp ('k') | core/src/fxcodec/codec/fx_codec_flate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698