summaryrefslogtreecommitdiff
path: root/core/fxge/win32/fx_win32_print.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-25 22:25:51 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-25 22:25:51 +0000
commitcde8b8cb0db2784d8f591fbfa7cfe7a67092b5fa (patch)
tree1cb46057fb039e390e8b18d37473081185417d16 /core/fxge/win32/fx_win32_print.cpp
parent84a534d9473af1d47767e9e576304a5a6c6bbff2 (diff)
downloadpdfium-cde8b8cb0db2784d8f591fbfa7cfe7a67092b5fa.tar.xz
Pass source rect parameter to SetDIBits() by const-ref.
In RenderDeviceDriverIface() implementations. Change-Id: Ic5e0239a29e7fa7b70e9ef65c82df7e773f8e363 Reviewed-on: https://pdfium-review.googlesource.com/c/44610 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge/win32/fx_win32_print.cpp')
-rw-r--r--core/fxge/win32/fx_win32_print.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/fxge/win32/fx_win32_print.cpp b/core/fxge/win32/fx_win32_print.cpp
index b92a46d08f..fce378cd4d 100644
--- a/core/fxge/win32/fx_win32_print.cpp
+++ b/core/fxge/win32/fx_win32_print.cpp
@@ -70,19 +70,19 @@ int CGdiPrinterDriver::GetDeviceCaps(int caps_id) const {
bool CGdiPrinterDriver::SetDIBits(const RetainPtr<CFX_DIBBase>& pSource,
uint32_t color,
- const FX_RECT* pSrcRect,
+ const FX_RECT& src_rect,
int left,
int top,
BlendMode blend_type) {
if (pSource->IsAlphaMask()) {
- FX_RECT clip_rect(left, top, left + pSrcRect->Width(),
- top + pSrcRect->Height());
- return StretchDIBits(pSource, color, left - pSrcRect->left,
- top - pSrcRect->top, pSource->GetWidth(),
+ FX_RECT clip_rect(left, top, left + src_rect.Width(),
+ top + src_rect.Height());
+ return StretchDIBits(pSource, color, left - src_rect.left,
+ top - src_rect.top, pSource->GetWidth(),
pSource->GetHeight(), &clip_rect, 0,
BlendMode::kNormal);
}
- ASSERT(pSource && !pSource->IsAlphaMask() && pSrcRect);
+ ASSERT(pSource && !pSource->IsAlphaMask());
ASSERT(blend_type == BlendMode::kNormal);
if (pSource->HasAlpha())
return false;
@@ -92,7 +92,7 @@ bool CGdiPrinterDriver::SetDIBits(const RetainPtr<CFX_DIBBase>& pSource,
if (!pBitmap)
return false;
- return GDI_SetDIBits(pBitmap, pSrcRect, left, top);
+ return GDI_SetDIBits(pBitmap, src_rect, left, top);
}
bool CGdiPrinterDriver::StretchDIBits(const RetainPtr<CFX_DIBBase>& pSource,
@@ -455,7 +455,7 @@ bool CPSPrinterDriver::GetClipBox(FX_RECT* pRect) {
bool CPSPrinterDriver::SetDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
uint32_t color,
- const FX_RECT* pSrcRect,
+ const FX_RECT& src_rect,
int left,
int top,
BlendMode blend_type) {
@@ -566,7 +566,7 @@ bool CTextOnlyPrinterDriver::DrawPath(const CFX_PathData* pPathData,
bool CTextOnlyPrinterDriver::SetDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
uint32_t color,
- const FX_RECT* pSrcRect,
+ const FX_RECT& src_rect,
int left,
int top,
BlendMode blend_type) {