From 60cc3baa05136bccf5d77e0b2cf3000817915bcd Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Fri, 5 May 2017 17:11:35 -0400 Subject: Cleanup CStretchEngine and its CWeightTable This CL cleans up a bunch of nits and improves ownership in the CStretchEngine class. Change-Id: I6527f29c50dab329ef58d0724cd24b94fca50ee6 Reviewed-on: https://pdfium-review.googlesource.com/4970 Commit-Queue: Lei Zhang Reviewed-by: Tom Sepez --- core/fxge/dib/cstretchengine.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'core/fxge/dib/cstretchengine.h') diff --git a/core/fxge/dib/cstretchengine.h b/core/fxge/dib/cstretchengine.h index 0d9457fb9d..280641cb59 100644 --- a/core/fxge/dib/cstretchengine.h +++ b/core/fxge/dib/cstretchengine.h @@ -7,6 +7,8 @@ #ifndef CORE_FXGE_DIB_CSTRETCHENGINE_H_ #define CORE_FXGE_DIB_CSTRETCHENGINE_H_ +#include + #include "core/fxcrt/fx_coordinates.h" #include "core/fxge/fx_dib.h" @@ -48,7 +50,7 @@ class CStretchEngine { private: int m_DestMin; int m_ItemSize; - uint8_t* m_pWeightTables; + std::vector m_WeightTables; size_t m_dwWeightTablesSize; }; @@ -57,10 +59,11 @@ class CStretchEngine { int m_SrcBpp; int m_bHasAlpha; IFX_ScanlineComposer* m_pDestBitmap; - int m_DestWidth, m_DestHeight; + int m_DestWidth; + int m_DestHeight; FX_RECT m_DestClip; - uint8_t* m_pDestScanline; - uint8_t* m_pDestMaskScanline; + std::vector m_DestScanline; + std::vector m_DestMaskScanline; FX_RECT m_SrcClip; CFX_RetainPtr m_pSource; uint32_t* m_pSrcPalette; @@ -69,8 +72,8 @@ class CStretchEngine { int m_SrcPitch; int m_InterPitch; int m_ExtraMaskPitch; - uint8_t* m_pInterBuf; - uint8_t* m_pExtraAlphaBuf; + std::vector m_InterBuf; + std::vector m_ExtraAlphaBuf; int m_TransMethod; int m_Flags; CWeightTable m_WeightTable; -- cgit v1.2.3