| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CORE_FXCODEC_CODEC_CCODEC_SCANLINEDECODER_H_ | 7 #ifndef CORE_FXCODEC_CODEC_CCODEC_SCANLINEDECODER_H_ |
| 8 #define CORE_FXCODEC_CODEC_CCODEC_SCANLINEDECODER_H_ | 8 #define CORE_FXCODEC_CODEC_CCODEC_SCANLINEDECODER_H_ |
| 9 | 9 |
| 10 #include "core/fxcrt/fx_system.h" | 10 #include "core/fxcrt/fx_system.h" |
| 11 | 11 |
| 12 class IFX_Pause; | 12 class IFX_Pause; |
| 13 | 13 |
| 14 class CCodec_ScanlineDecoder { | 14 class CCodec_ScanlineDecoder { |
| 15 public: | 15 public: |
| 16 CCodec_ScanlineDecoder(); | 16 CCodec_ScanlineDecoder(); |
| 17 CCodec_ScanlineDecoder(int nOrigWidth, | 17 CCodec_ScanlineDecoder(int nOrigWidth, |
| 18 int nOrigHeight, | 18 int nOrigHeight, |
| 19 int nOutputWidth, | 19 int nOutputWidth, |
| 20 int nOutputHeight, | 20 int nOutputHeight, |
| 21 int nComps, | 21 int nComps, |
| 22 int nBpc, | 22 int nBpc, |
| 23 uint32_t nPitch); | 23 uint32_t nPitch); |
| 24 virtual ~CCodec_ScanlineDecoder(); | 24 virtual ~CCodec_ScanlineDecoder(); |
| 25 | 25 |
| 26 const uint8_t* GetScanline(int line); | 26 const uint8_t* GetScanline(int line); |
| 27 FX_BOOL SkipToScanline(int line, IFX_Pause* pPause); | 27 bool SkipToScanline(int line, IFX_Pause* pPause); |
| 28 | 28 |
| 29 int GetWidth() { return m_OutputWidth; } | 29 int GetWidth() { return m_OutputWidth; } |
| 30 int GetHeight() { return m_OutputHeight; } | 30 int GetHeight() { return m_OutputHeight; } |
| 31 int CountComps() { return m_nComps; } | 31 int CountComps() { return m_nComps; } |
| 32 int GetBPC() { return m_bpc; } | 32 int GetBPC() { return m_bpc; } |
| 33 | 33 |
| 34 virtual uint32_t GetSrcOffset() = 0; | 34 virtual uint32_t GetSrcOffset() = 0; |
| 35 | 35 |
| 36 protected: | 36 protected: |
| 37 virtual FX_BOOL v_Rewind() = 0; | 37 virtual bool v_Rewind() = 0; |
| 38 virtual uint8_t* v_GetNextLine() = 0; | 38 virtual uint8_t* v_GetNextLine() = 0; |
| 39 | 39 |
| 40 uint8_t* ReadNextLine(); | 40 uint8_t* ReadNextLine(); |
| 41 | 41 |
| 42 int m_OrigWidth; | 42 int m_OrigWidth; |
| 43 int m_OrigHeight; | 43 int m_OrigHeight; |
| 44 int m_OutputWidth; | 44 int m_OutputWidth; |
| 45 int m_OutputHeight; | 45 int m_OutputHeight; |
| 46 int m_nComps; | 46 int m_nComps; |
| 47 int m_bpc; | 47 int m_bpc; |
| 48 uint32_t m_Pitch; | 48 uint32_t m_Pitch; |
| 49 int m_NextLine; | 49 int m_NextLine; |
| 50 uint8_t* m_pLastScanline; | 50 uint8_t* m_pLastScanline; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 #endif // CORE_FXCODEC_CODEC_CCODEC_SCANLINEDECODER_H_ | 53 #endif // CORE_FXCODEC_CODEC_CCODEC_SCANLINEDECODER_H_ |
| OLD | NEW |