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

Unified Diff: core/src/fxcodec/codec/fx_codec_jpeg.cpp

Issue 1292613003: Use override in more classes in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nit Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fxcodec/codec/fx_codec_flate.cpp ('k') | core/src/fxcrt/extension.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcodec/codec/fx_codec_jpeg.cpp
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
index 681678c264b5850f5f4da76965d7dcffeedc4cce..779e7f6b379d222b28c7c5cb4de5a14b2a4937d8 100644
--- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
@@ -287,10 +287,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,
@@ -298,11 +300,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;
@@ -310,14 +317,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;
« no previous file with comments | « core/src/fxcodec/codec/fx_codec_flate.cpp ('k') | core/src/fxcrt/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698