summaryrefslogtreecommitdiff
path: root/core/fxge/dib/cfx_bitmapcomposer.h
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-04-06 15:29:20 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-06 19:44:17 +0000
commit8bf955c77fefe98a97676a52360590211f723dee (patch)
tree120b7d31af39f998768c2dd9df3e0be9fe12a041 /core/fxge/dib/cfx_bitmapcomposer.h
parent93c086c8bc8080e7591def6eb617dfd6d11b9932 (diff)
downloadpdfium-8bf955c77fefe98a97676a52360590211f723dee.tar.xz
Cleanup CFX_BitmapComposer
Remove default params, use more unique_ptr, and fix some nits. Change-Id: I4ed9a576fb3ebd9afd64c6544d1f6a1103e9d270 Reviewed-on: https://pdfium-review.googlesource.com/3872 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fxge/dib/cfx_bitmapcomposer.h')
-rw-r--r--core/fxge/dib/cfx_bitmapcomposer.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/core/fxge/dib/cfx_bitmapcomposer.h b/core/fxge/dib/cfx_bitmapcomposer.h
index 6d14533b13..5ab0647478 100644
--- a/core/fxge/dib/cfx_bitmapcomposer.h
+++ b/core/fxge/dib/cfx_bitmapcomposer.h
@@ -7,6 +7,8 @@
#ifndef CORE_FXGE_DIB_CFX_BITMAPCOMPOSER_H_
#define CORE_FXGE_DIB_CFX_BITMAPCOMPOSER_H_
+#include <vector>
+
#include "core/fxcrt/cfx_retain_ptr.h"
#include "core/fxcrt/fx_coordinates.h"
#include "core/fxge/dib/cfx_scanlinecompositor.h"
@@ -24,14 +26,14 @@ class CFX_BitmapComposer : public IFX_ScanlineComposer {
const CFX_ClipRgn* pClipRgn,
int bitmap_alpha,
uint32_t mask_color,
- FX_RECT& dest_rect,
+ const FX_RECT& dest_rect,
bool bVertical,
bool bFlipX,
bool bFlipY,
- bool bRgbByteOrder = false,
- int alpha_flag = 0,
- void* pIccTransform = nullptr,
- int blend_type = FXDIB_BLEND_NORMAL);
+ bool bRgbByteOrder,
+ int alpha_flag,
+ void* pIccTransform,
+ int blend_type);
// IFX_ScanlineComposer
bool SetInfo(int width,
@@ -48,11 +50,11 @@ class CFX_BitmapComposer : public IFX_ScanlineComposer {
const uint8_t* src_scan,
int dest_width,
const uint8_t* clip_scan,
- const uint8_t* src_extra_alpha = nullptr,
- uint8_t* dst_extra_alpha = nullptr);
+ const uint8_t* src_extra_alpha,
+ uint8_t* dst_extra_alpha);
void ComposeScanlineV(int line,
const uint8_t* scanline,
- const uint8_t* scan_extra_alpha = nullptr);
+ const uint8_t* scan_extra_alpha);
CFX_RetainPtr<CFX_DIBitmap> m_pBitmap;
const CFX_ClipRgn* m_pClipRgn;
@@ -72,10 +74,10 @@ class CFX_BitmapComposer : public IFX_ScanlineComposer {
void* m_pIccTransform;
bool m_bRgbByteOrder;
int m_BlendType;
- uint8_t* m_pScanlineV;
- uint8_t* m_pClipScanV;
- uint8_t* m_pAddClipScan;
- uint8_t* m_pScanlineAlphaV;
+ std::vector<uint8_t> m_pScanlineV;
+ std::vector<uint8_t> m_pClipScanV;
+ std::vector<uint8_t> m_pAddClipScan;
+ std::vector<uint8_t> m_pScanlineAlphaV;
};
#endif // CORE_FXGE_DIB_CFX_BITMAPCOMPOSER_H_