summaryrefslogtreecommitdiff
path: root/core/fxge/dib/dib_int.h
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-07-29 13:38:54 -0700
committerCommit bot <commit-bot@chromium.org>2016-07-29 13:38:54 -0700
commit246221724a106c11481eedbf1f94475afba23569 (patch)
treebb0807ed176979a933fc025b5611f07e3313ab01 /core/fxge/dib/dib_int.h
parent823df2adff3c9a87a61de33eeefab5669000e429 (diff)
downloadpdfium-246221724a106c11481eedbf1f94475afba23569.tar.xz
Fix a FPE in CStretchEngine::StartStretchHorz().
Do some cleanup in the process. BUG=629839 Review-Url: https://codereview.chromium.org/2190283003
Diffstat (limited to 'core/fxge/dib/dib_int.h')
-rw-r--r--core/fxge/dib/dib_int.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/core/fxge/dib/dib_int.h b/core/fxge/dib/dib_int.h
index 415362d51d..61533baf2c 100644
--- a/core/fxge/dib/dib_int.h
+++ b/core/fxge/dib/dib_int.h
@@ -60,6 +60,7 @@ class CWeightTable {
int m_DestMin, m_ItemSize;
uint8_t* m_pWeightTables;
};
+
class CStretchEngine {
public:
CStretchEngine(IFX_ScanlineComposer* pDestBitmap,
@@ -70,11 +71,17 @@ class CStretchEngine {
const CFX_DIBSource* pSrcBitmap,
int flags);
~CStretchEngine();
+
FX_BOOL Continue(IFX_Pause* pPause);
- public:
+ FX_BOOL StartStretchHorz();
+ FX_BOOL ContinueStretchHorz(IFX_Pause* pPause);
+ void StretchVert();
+
FXDIB_Format m_DestFormat;
- int m_DestBpp, m_SrcBpp, m_bHasAlpha;
+ int m_DestBpp;
+ int m_SrcBpp;
+ int m_bHasAlpha;
IFX_ScanlineComposer* m_pDestBitmap;
int m_DestWidth, m_DestHeight;
FX_RECT m_DestClip;
@@ -83,8 +90,10 @@ class CStretchEngine {
FX_RECT m_SrcClip;
const CFX_DIBSource* m_pSource;
uint32_t* m_pSrcPalette;
- int m_SrcWidth, m_SrcHeight;
- int m_SrcPitch, m_InterPitch;
+ int m_SrcWidth;
+ int m_SrcHeight;
+ int m_SrcPitch;
+ int m_InterPitch;
int m_ExtraMaskPitch;
uint8_t* m_pInterBuf;
uint8_t* m_pExtraAlphaBuf;
@@ -92,9 +101,6 @@ class CStretchEngine {
int m_Flags;
CWeightTable m_WeightTable;
int m_CurRow;
- FX_BOOL StartStretchHorz();
- FX_BOOL ContinueStretchHorz(IFX_Pause* pPause);
- void StretchVert();
int m_State;
};