summaryrefslogtreecommitdiff
path: root/core/fxge/dib/cstretchengine.h
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-05-05 17:11:35 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-05-05 22:05:14 +0000
commit60cc3baa05136bccf5d77e0b2cf3000817915bcd (patch)
tree425aa82185a2ebd5257ab042644f3f0fd582cecf /core/fxge/dib/cstretchengine.h
parent54b9166366085b30b7ee3094c2b71cd36e377153 (diff)
downloadpdfium-60cc3baa05136bccf5d77e0b2cf3000817915bcd.tar.xz
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 <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge/dib/cstretchengine.h')
-rw-r--r--core/fxge/dib/cstretchengine.h15
1 files changed, 9 insertions, 6 deletions
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 <vector>
+
#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<uint8_t> 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<uint8_t> m_DestScanline;
+ std::vector<uint8_t> m_DestMaskScanline;
FX_RECT m_SrcClip;
CFX_RetainPtr<CFX_DIBSource> 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<uint8_t> m_InterBuf;
+ std::vector<uint8_t> m_ExtraAlphaBuf;
int m_TransMethod;
int m_Flags;
CWeightTable m_WeightTable;