summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/codec/fx_codec_jpeg.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-14 21:49:19 -0700
committerLei Zhang <thestig@chromium.org>2015-08-14 21:49:19 -0700
commit62b2e912dc2a508972fbf01b25f7449c39ff1543 (patch)
tree47a244dc5891b2a338ca529b796e12994e642cbc /core/src/fxcodec/codec/fx_codec_jpeg.cpp
parentbdf72c353af5b8a34ef5efdeddfff36d2089a158 (diff)
downloadpdfium-62b2e912dc2a508972fbf01b25f7449c39ff1543.tar.xz
Merge to XFA: Use override in more classes in core/
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1292613003 . (cherry picked from commit c2c3f7b5f0396409451a9d344f35ec1929a76e9f) Review URL: https://codereview.chromium.org/1296043002 .
Diffstat (limited to 'core/src/fxcodec/codec/fx_codec_jpeg.cpp')
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpeg.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
index 4fa99f3981..ae13e43bea 100644
--- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
@@ -362,10 +362,12 @@ static FX_BOOL _JpegLoadInfo(const uint8_t* src_buf,
jpeg_destroy_decompress(&cinfo);
return TRUE;
}
+
class CCodec_JpegDecoder : public CCodec_ScanlineDecoder {
public:
CCodec_JpegDecoder();
- ~CCodec_JpegDecoder();
+ ~CCodec_JpegDecoder() override;
+
FX_BOOL Create(const uint8_t* src_buf,
FX_DWORD src_size,
int width,
@@ -373,11 +375,16 @@ class CCodec_JpegDecoder : public CCodec_ScanlineDecoder {
int nComps,
FX_BOOL ColorTransform,
IFX_JpegProvider* pJP);
- virtual void Destroy() { delete this; }
- virtual void v_DownScale(int dest_width, int dest_height);
- virtual FX_BOOL v_Rewind();
- virtual uint8_t* v_GetNextLine();
- virtual FX_DWORD GetSrcOffset();
+ void Destroy() { delete this; }
+
+ // CCodec_ScanlineDecoder
+ void v_DownScale(int dest_width, int dest_height) override;
+ FX_BOOL v_Rewind() override;
+ uint8_t* v_GetNextLine() override;
+ FX_DWORD GetSrcOffset() override;
+
+ FX_BOOL InitDecode();
+
jmp_buf m_JmpBuf;
struct jpeg_decompress_struct cinfo;
struct jpeg_error_mgr jerr;
@@ -385,14 +392,17 @@ class CCodec_JpegDecoder : public CCodec_ScanlineDecoder {
const uint8_t* m_SrcBuf;
FX_DWORD m_SrcSize;
uint8_t* m_pScanlineBuf;
- FX_BOOL InitDecode();
- FX_BOOL m_bInited, m_bStarted, m_bJpegTransform;
+
+ FX_BOOL m_bInited;
+ FX_BOOL m_bStarted;
+ FX_BOOL m_bJpegTransform;
protected:
IFX_JpegProvider* m_pExtProvider;
void* m_pExtContext;
FX_DWORD m_nDefaultScaleDenom;
};
+
CCodec_JpegDecoder::CCodec_JpegDecoder() {
m_pScanlineBuf = NULL;
m_DownScale = 1;