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

Side by Side Diff: core/fxcodec/codec/fx_codec.cpp

Issue 1876023003: Remove ICodec_* Interfaces. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 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
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 "core/fxcodec/include/fx_codec.h" 7 #include "core/fxcodec/include/fx_codec.h"
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 uint8_t count = 257 - m_Operator; 390 uint8_t count = 257 - m_Operator;
391 FXSYS_assert((uint32_t)count >= used_bytes); 391 FXSYS_assert((uint32_t)count >= used_bytes);
392 if (used_bytes == count) { 392 if (used_bytes == count) {
393 m_SrcOffset++; 393 m_SrcOffset++;
394 GetNextOperator(); 394 GetNextOperator();
395 return; 395 return;
396 } 396 }
397 count -= used_bytes; 397 count -= used_bytes;
398 m_Operator = 257 - count; 398 m_Operator = 257 - count;
399 } 399 }
400 ICodec_ScanlineDecoder* CCodec_BasicModule::CreateRunLengthDecoder( 400 CCodec_ScanlineDecoder* CCodec_BasicModule::CreateRunLengthDecoder(
401 const uint8_t* src_buf, 401 const uint8_t* src_buf,
402 uint32_t src_size, 402 uint32_t src_size,
403 int width, 403 int width,
404 int height, 404 int height,
405 int nComps, 405 int nComps,
406 int bpc) { 406 int bpc) {
407 CCodec_RLScanlineDecoder* pRLScanlineDecoder = new CCodec_RLScanlineDecoder; 407 CCodec_RLScanlineDecoder* pRLScanlineDecoder = new CCodec_RLScanlineDecoder;
Tom Sepez 2016/04/11 17:16:21 unique_ptr.
dsinclair 2016/04/11 20:40:40 Done.
408 if (!pRLScanlineDecoder->Create(src_buf, src_size, width, height, nComps, 408 if (!pRLScanlineDecoder->Create(src_buf, src_size, width, height, nComps,
409 bpc)) { 409 bpc)) {
410 delete pRLScanlineDecoder; 410 delete pRLScanlineDecoder;
411 return NULL; 411 return NULL;
412 } 412 }
413 return pRLScanlineDecoder; 413 return pRLScanlineDecoder;
Tom Sepez 2016/04/11 17:16:21 return blah.release();
dsinclair 2016/04/11 20:40:40 Done.
414 } 414 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698