summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-16 16:20:08 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-16 16:20:08 +0000
commit048d7f7c1e0c6c42679a5646ae9db5b7d98ed755 (patch)
tree42701f3662d9454d7ce23fcf8cae1c3108763095 /core/fxge
parent2a3377ce9a39d47d29c95d5db64690ad749d8c94 (diff)
downloadpdfium-048d7f7c1e0c6c42679a5646ae9db5b7d98ed755.tar.xz
Remove more optional args in core/
Change-Id: I6a2bd03e00ad4e3d57f6931c0c6cf4ae0c760afb Reviewed-on: https://pdfium-review.googlesource.com/40290 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/agg/fx_agg_driver.cpp2
-rw-r--r--core/fxge/dib/cfx_dibextractor.cpp2
-rw-r--r--core/fxge/dib/cfx_dibitmap.cpp4
-rw-r--r--core/fxge/dib/cfx_dibitmap.h20
-rw-r--r--core/fxge/win32/fx_win32_dib.cpp2
5 files changed, 18 insertions, 12 deletions
diff --git a/core/fxge/agg/fx_agg_driver.cpp b/core/fxge/agg/fx_agg_driver.cpp
index 3d35e12e45..9166fbb0c8 100644
--- a/core/fxge/agg/fx_agg_driver.cpp
+++ b/core/fxge/agg/fx_agg_driver.cpp
@@ -1469,7 +1469,7 @@ bool CFX_AggDeviceDriver::GetDIBits(const RetainPtr<CFX_DIBitmap>& pBitmap,
return true;
pBack->CompositeBitmap(0, 0, pBack->GetWidth(), pBack->GetHeight(),
- m_pBitmap, 0, 0);
+ m_pBitmap, 0, 0, FXDIB_BLEND_NORMAL, nullptr, false);
} else {
pBack = m_pBitmap->Clone(&rect);
if (!pBack)
diff --git a/core/fxge/dib/cfx_dibextractor.cpp b/core/fxge/dib/cfx_dibextractor.cpp
index 13ad461cb1..9fe3114b1f 100644
--- a/core/fxge/dib/cfx_dibextractor.cpp
+++ b/core/fxge/dib/cfx_dibextractor.cpp
@@ -16,7 +16,7 @@ CFX_DIBExtractor::CFX_DIBExtractor(const RetainPtr<CFX_DIBSource>& pSrc) {
RetainPtr<CFX_DIBSource> pOldSrc(pSrc);
m_pBitmap = pdfium::MakeRetain<CFX_DIBitmap>();
if (!m_pBitmap->Create(pOldSrc->GetWidth(), pOldSrc->GetHeight(),
- pOldSrc->GetFormat(), pOldSrc->GetBuffer())) {
+ pOldSrc->GetFormat(), pOldSrc->GetBuffer(), 0)) {
m_pBitmap.Reset();
return;
}
diff --git a/core/fxge/dib/cfx_dibitmap.cpp b/core/fxge/dib/cfx_dibitmap.cpp
index 3d642c2e76..2c99bd16e0 100644
--- a/core/fxge/dib/cfx_dibitmap.cpp
+++ b/core/fxge/dib/cfx_dibitmap.cpp
@@ -30,6 +30,10 @@ CFX_DIBitmap::CFX_DIBitmap() {
#endif
}
+bool CFX_DIBitmap::Create(int width, int height, FXDIB_Format format) {
+ return Create(width, height, format, nullptr, 0);
+}
+
bool CFX_DIBitmap::Create(int width,
int height,
FXDIB_Format format,
diff --git a/core/fxge/dib/cfx_dibitmap.h b/core/fxge/dib/cfx_dibitmap.h
index 008a549bac..d9afee6800 100644
--- a/core/fxge/dib/cfx_dibitmap.h
+++ b/core/fxge/dib/cfx_dibitmap.h
@@ -18,11 +18,13 @@ class CFX_DIBitmap : public CFX_DIBSource {
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
+ bool Create(int width, int height, FXDIB_Format format);
+
bool Create(int width,
int height,
FXDIB_Format format,
- uint8_t* pBuffer = nullptr,
- uint32_t pitch = 0);
+ uint8_t* pBuffer,
+ uint32_t pitch);
bool Copy(const RetainPtr<CFX_DIBSource>& pSrc);
@@ -67,9 +69,9 @@ class CFX_DIBitmap : public CFX_DIBSource {
const RetainPtr<CFX_DIBSource>& pSrcBitmap,
int src_left,
int src_top,
- int blend_type = FXDIB_BLEND_NORMAL,
- const CFX_ClipRgn* pClipRgn = nullptr,
- bool bRgbByteOrder = false);
+ int blend_type,
+ const CFX_ClipRgn* pClipRgn,
+ bool bRgbByteOrder);
bool CompositeMask(int dest_left,
int dest_top,
@@ -79,10 +81,10 @@ class CFX_DIBitmap : public CFX_DIBSource {
uint32_t color,
int src_left,
int src_top,
- int blend_type = FXDIB_BLEND_NORMAL,
- const CFX_ClipRgn* pClipRgn = nullptr,
- bool bRgbByteOrder = false,
- int alpha_flag = 0);
+ int blend_type,
+ const CFX_ClipRgn* pClipRgn,
+ bool bRgbByteOrder,
+ int alpha_flag);
bool CompositeRect(int dest_left,
int dest_top,
diff --git a/core/fxge/win32/fx_win32_dib.cpp b/core/fxge/win32/fx_win32_dib.cpp
index b6bed7a987..23cc633f6b 100644
--- a/core/fxge/win32/fx_win32_dib.cpp
+++ b/core/fxge/win32/fx_win32_dib.cpp
@@ -187,7 +187,7 @@ RetainPtr<CFX_DIBitmap> CFX_WindowsDIB::LoadDIBitmap(WINDIB_Open_Args_ args) {
}
CFX_WindowsDIB::CFX_WindowsDIB(HDC hDC, int width, int height) {
- Create(width, height, FXDIB_Rgb, (uint8_t*)1);
+ Create(width, height, FXDIB_Rgb, (uint8_t*)1, 0);
BITMAPINFOHEADER bmih;
memset(&bmih, 0, sizeof bmih);
bmih.biSize = sizeof bmih;