summaryrefslogtreecommitdiff
path: root/core/fxge/win32
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-05-26 10:45:30 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-26 10:45:30 -0700
commit41846a0fcc7d98476a18ec6c97778ead58069d99 (patch)
treea91f1273a03ca027c066a571b41f590896404574 /core/fxge/win32
parente9885e77a7daf7a8d45eaf0290a1ea5f208c24c6 (diff)
downloadpdfium-41846a0fcc7d98476a18ec6c97778ead58069d99.tar.xz
Remove default argument from RestoreState() methods.
Review-Url: https://codereview.chromium.org/2009803003
Diffstat (limited to 'core/fxge/win32')
-rw-r--r--core/fxge/win32/fx_win32_device.cpp12
-rw-r--r--core/fxge/win32/fx_win32_print.cpp6
-rw-r--r--core/fxge/win32/win32_int.h11
3 files changed, 19 insertions, 10 deletions
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp
index caf271dff3..b71f3ae97a 100644
--- a/core/fxge/win32/fx_win32_device.cpp
+++ b/core/fxge/win32/fx_win32_device.cpp
@@ -507,6 +507,7 @@ CGdiDeviceDriver::CGdiDeviceDriver(HDC hDC, int device_class) {
m_RenderCaps = FXRC_GET_BITS | FXRC_BIT_MASK;
}
}
+
int CGdiDeviceDriver::GetDeviceCaps(int caps_id) {
switch (caps_id) {
case FXDC_DEVICE_CLASS:
@@ -522,6 +523,17 @@ int CGdiDeviceDriver::GetDeviceCaps(int caps_id) {
}
return 0;
}
+
+void CGdiDeviceDriver::SaveState() {
+ SaveDC(m_hDC);
+}
+
+void CGdiDeviceDriver::RestoreState(bool bKeepSaved) {
+ RestoreDC(m_hDC, -1);
+ if (bKeepSaved)
+ SaveDC(m_hDC);
+}
+
void* CGdiDeviceDriver::GetClipRgn() {
HRGN hClipRgn = CreateRectRgn(0, 0, 1, 1);
if (::GetClipRgn(m_hDC, hClipRgn) == 0) {
diff --git a/core/fxge/win32/fx_win32_print.cpp b/core/fxge/win32/fx_win32_print.cpp
index d0359138de..9fd1683a80 100644
--- a/core/fxge/win32/fx_win32_print.cpp
+++ b/core/fxge/win32/fx_win32_print.cpp
@@ -270,7 +270,7 @@ FX_BOOL CGdiPrinterDriver::StartDIBits(const CFX_DIBSource* pSource,
FX_BOOL ret = StretchDIBits(
pTransformed, color, full_rect.left, full_rect.top, full_rect.Width(),
full_rect.Height(), NULL, 0, alpha_flag, pIccTransform, blend_type);
- RestoreState();
+ RestoreState(false);
delete pTransformed;
handle = NULL;
return ret;
@@ -371,9 +371,11 @@ void CPSPrinterDriver::EndRendering() {
void CPSPrinterDriver::SaveState() {
m_PSRenderer.SaveState();
}
-void CPSPrinterDriver::RestoreState(FX_BOOL bKeepSaved) {
+
+void CPSPrinterDriver::RestoreState(bool bKeepSaved) {
m_PSRenderer.RestoreState(bKeepSaved);
}
+
FX_BOOL CPSPrinterDriver::SetClip_PathFill(const CFX_PathData* pPathData,
const CFX_Matrix* pObject2Device,
int fill_mode) {
diff --git a/core/fxge/win32/win32_int.h b/core/fxge/win32/win32_int.h
index 619ac2fdae..d2d091bc19 100644
--- a/core/fxge/win32/win32_int.h
+++ b/core/fxge/win32/win32_int.h
@@ -109,13 +109,8 @@ class CGdiDeviceDriver : public IFX_RenderDeviceDriver {
protected:
// IFX_RenderDeviceDriver
int GetDeviceCaps(int caps_id) override;
- void SaveState() override { SaveDC(m_hDC); }
- void RestoreState(FX_BOOL bKeepSaved = FALSE) override {
- RestoreDC(m_hDC, -1);
- if (bKeepSaved) {
- SaveDC(m_hDC);
- }
- }
+ void SaveState() override;
+ void RestoreState(bool bKeepSaved) override;
FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData,
const CFX_Matrix* pObject2Device,
int fill_mode) override;
@@ -298,7 +293,7 @@ class CPSPrinterDriver : public IFX_RenderDeviceDriver {
FX_BOOL StartRendering() override;
void EndRendering() override;
void SaveState() override;
- void RestoreState(FX_BOOL bKeepSaved = FALSE) override;
+ void RestoreState(bool bKeepSaved) override;
FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData,
const CFX_Matrix* pObject2Device,
int fill_mode) override;