summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec/ccodec_progressivedecoder.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-09-04 22:27:18 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-09-04 22:27:18 +0000
commitd51c66c57a4fa6033f025d6ddd5d17a7d4e1d001 (patch)
tree38a3416b3ac39f45eff8c43b7ef84cc8ffe25a62 /core/fxcodec/codec/ccodec_progressivedecoder.h
parent76188c505dac5c4e35911edbc97d0dacbe366038 (diff)
downloadpdfium-d51c66c57a4fa6033f025d6ddd5d17a7d4e1d001.tar.xz
Consolidate some common code in ccoded_progressivedecoder.
Small consolidation before trying to fix a memory issue. Unfortunately, this involves converting a switch -> ifs, since we no longer dispatch exactly the same. Change-Id: I7ef61db98cdfbbc983adf21e7b3fe4ef1d2ce869 Reviewed-on: https://pdfium-review.googlesource.com/41830 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/ccodec_progressivedecoder.h')
-rw-r--r--core/fxcodec/codec/ccodec_progressivedecoder.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/fxcodec/codec/ccodec_progressivedecoder.h b/core/fxcodec/codec/ccodec_progressivedecoder.h
index 1f72d9f044..87bf18411d 100644
--- a/core/fxcodec/codec/ccodec_progressivedecoder.h
+++ b/core/fxcodec/codec/ccodec_progressivedecoder.h
@@ -184,7 +184,7 @@ class CCodec_ProgressiveDecoder :
bool BmpReadMoreData(CCodec_BmpModule* pBmpModule,
CCodec_BmpModule::Context* pBmpContext,
FXCODEC_STATUS& err_status);
- bool BmpDetectImageType(CFX_DIBAttribute* pAttribute, uint32_t size);
+ bool BmpDetectImageTypeInBuffer(CFX_DIBAttribute* pAttribute);
FXCODEC_STATUS BmpStartDecode(const RetainPtr<CFX_DIBitmap>& pDIBitmap);
FXCODEC_STATUS BmpContinueDecode();
#endif // PDF_ENABLE_XFA_BMP
@@ -192,7 +192,7 @@ class CCodec_ProgressiveDecoder :
#ifdef PDF_ENABLE_XFA_GIF
bool GifReadMoreData(CCodec_GifModule* pGifModule,
FXCODEC_STATUS& err_status);
- bool GifDetectImageType(CFX_DIBAttribute* pAttribute, uint32_t size);
+ bool GifDetectImageTypeInBuffer(CFX_DIBAttribute* pAttribute);
FXCODEC_STATUS GifStartDecode(const RetainPtr<CFX_DIBitmap>& pDIBitmap);
FXCODEC_STATUS GifContinueDecode();
void GifDoubleLineResampleVert(const RetainPtr<CFX_DIBitmap>& pDeviceBitmap,
@@ -202,7 +202,7 @@ class CCodec_ProgressiveDecoder :
bool JpegReadMoreData(CCodec_JpegModule* pJpegModule,
FXCODEC_STATUS& err_status);
- bool JpegDetectImageType(CFX_DIBAttribute* pAttribute, uint32_t size);
+ bool JpegDetectImageTypeInBuffer(CFX_DIBAttribute* pAttribute);
FXCODEC_STATUS JpegStartDecode(const RetainPtr<CFX_DIBitmap>& pDIBitmap);
FXCODEC_STATUS JpegContinueDecode();
@@ -211,13 +211,13 @@ class CCodec_ProgressiveDecoder :
int32_t dest_line,
uint8_t* src_scan,
FXCodec_Format src_format);
- bool PngDetectImageType(CFX_DIBAttribute* pAttribute, uint32_t size);
+ bool PngDetectImageTypeInBuffer(CFX_DIBAttribute* pAttribute);
FXCODEC_STATUS PngStartDecode(const RetainPtr<CFX_DIBitmap>& pDIBitmap);
FXCODEC_STATUS PngContinueDecode();
#endif // PDF_ENABLE_XFA_PNG
#ifdef PDF_ENABLE_XFA_TIFF
- bool TiffDetectImageType(CFX_DIBAttribute* pAttribute, uint32_t size);
+ bool TiffDetectImageTypeFromFile(CFX_DIBAttribute* pAttribute);
FXCODEC_STATUS TiffContinueDecode();
#endif // PDF_ENABLE_XFA_TIFF