| 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/fxcodec/fx_codec.h" | 7 #include "../../../include/fxcodec/fx_codec.h" | 
| 8 #include "codec_int.h" | 8 #include "codec_int.h" | 
| 9 | 9 | 
| 10 CCodec_ModuleMgr::CCodec_ModuleMgr() | 10 CCodec_ModuleMgr::CCodec_ModuleMgr() | 
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 556         uint8_t** dst = (uint8_t**)val; | 556         uint8_t** dst = (uint8_t**)val; | 
| 557         *dst = ptr; | 557         *dst = ptr; | 
| 558       } | 558       } | 
| 559     } | 559     } | 
| 560   } | 560   } | 
| 561   return TRUE; | 561   return TRUE; | 
| 562 } | 562 } | 
| 563 class CCodec_RLScanlineDecoder : public CCodec_ScanlineDecoder { | 563 class CCodec_RLScanlineDecoder : public CCodec_ScanlineDecoder { | 
| 564  public: | 564  public: | 
| 565   CCodec_RLScanlineDecoder(); | 565   CCodec_RLScanlineDecoder(); | 
| 566   virtual ~CCodec_RLScanlineDecoder(); | 566   ~CCodec_RLScanlineDecoder() override; | 
|  | 567 | 
| 567   FX_BOOL Create(const uint8_t* src_buf, | 568   FX_BOOL Create(const uint8_t* src_buf, | 
| 568                  FX_DWORD src_size, | 569                  FX_DWORD src_size, | 
| 569                  int width, | 570                  int width, | 
| 570                  int height, | 571                  int height, | 
| 571                  int nComps, | 572                  int nComps, | 
| 572                  int bpc); | 573                  int bpc); | 
| 573   virtual void v_DownScale(int dest_width, int dest_height) {} | 574 | 
| 574   virtual FX_BOOL v_Rewind(); | 575   // CCodec_ScanlineDecoder | 
| 575   virtual uint8_t* v_GetNextLine(); | 576   void v_DownScale(int dest_width, int dest_height) override {} | 
| 576   virtual FX_DWORD GetSrcOffset() { return m_SrcOffset; } | 577   FX_BOOL v_Rewind() override; | 
|  | 578   uint8_t* v_GetNextLine() override; | 
|  | 579   FX_DWORD GetSrcOffset() override { return m_SrcOffset; } | 
| 577 | 580 | 
| 578  protected: | 581  protected: | 
| 579   FX_BOOL CheckDestSize(); | 582   FX_BOOL CheckDestSize(); | 
| 580   void GetNextOperator(); | 583   void GetNextOperator(); | 
| 581   void UpdateOperator(uint8_t used_bytes); | 584   void UpdateOperator(uint8_t used_bytes); | 
| 582 | 585 | 
| 583   uint8_t* m_pScanline; | 586   uint8_t* m_pScanline; | 
| 584   const uint8_t* m_pSrcBuf; | 587   const uint8_t* m_pSrcBuf; | 
| 585   FX_DWORD m_SrcSize; | 588   FX_DWORD m_SrcSize; | 
| 586   FX_DWORD m_dwLineBytes; | 589   FX_DWORD m_dwLineBytes; | 
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 745     int nComps, | 748     int nComps, | 
| 746     int bpc) { | 749     int bpc) { | 
| 747   CCodec_RLScanlineDecoder* pRLScanlineDecoder = new CCodec_RLScanlineDecoder; | 750   CCodec_RLScanlineDecoder* pRLScanlineDecoder = new CCodec_RLScanlineDecoder; | 
| 748   if (!pRLScanlineDecoder->Create(src_buf, src_size, width, height, nComps, | 751   if (!pRLScanlineDecoder->Create(src_buf, src_size, width, height, nComps, | 
| 749                                   bpc)) { | 752                                   bpc)) { | 
| 750     delete pRLScanlineDecoder; | 753     delete pRLScanlineDecoder; | 
| 751     return NULL; | 754     return NULL; | 
| 752   } | 755   } | 
| 753   return pRLScanlineDecoder; | 756   return pRLScanlineDecoder; | 
| 754 } | 757 } | 
| OLD | NEW | 
|---|