summaryrefslogtreecommitdiff
path: root/core/fxge/skia/fx_skia_device.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/skia/fx_skia_device.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/skia/fx_skia_device.cpp')
-rw-r--r--core/fxge/skia/fx_skia_device.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index d4a67be98a..e0010cdf78 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -2238,7 +2238,7 @@ RetainPtr<CFX_DIBitmap> CFX_SkiaDeviceDriver::GetBackDrop() {
bool CFX_SkiaDeviceDriver::SetDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
uint32_t argb,
- const FX_RECT* pSrcRect,
+ const FX_RECT& src_rect,
int left,
int top,
BlendMode blend_type) {
@@ -2255,14 +2255,14 @@ bool CFX_SkiaDeviceDriver::SetDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
#ifdef _SKIA_SUPPORT_PATHS_
Flush();
if (pBitmap->IsAlphaMask()) {
- return m_pBitmap->CompositeMask(left, top, pSrcRect->Width(),
- pSrcRect->Height(), pBitmap, argb,
- pSrcRect->left, pSrcRect->top, blend_type,
+ return m_pBitmap->CompositeMask(left, top, src_rect.Width(),
+ src_rect.Height(), pBitmap, argb,
+ src_rect.left, src_rect.top, blend_type,
m_pClipRgn.get(), m_bRgbByteOrder, 0);
}
return m_pBitmap->CompositeBitmap(
- left, top, pSrcRect->Width(), pSrcRect->Height(), pBitmap, pSrcRect->left,
- pSrcRect->top, blend_type, m_pClipRgn.get(), m_bRgbByteOrder);
+ left, top, src_rect.Width(), src_rect.Height(), pBitmap, src_rect.left,
+ src_rect.top, blend_type, m_pClipRgn.get(), m_bRgbByteOrder);
#endif // _SKIA_SUPPORT_PATHS_
}
@@ -2297,7 +2297,7 @@ bool CFX_SkiaDeviceDriver::StretchDIBits(const RetainPtr<CFX_DIBBase>& pSource,
if (dest_width == pSource->GetWidth() &&
dest_height == pSource->GetHeight()) {
FX_RECT rect(0, 0, dest_width, dest_height);
- return SetDIBits(pSource, argb, &rect, dest_left, dest_top, blend_type);
+ return SetDIBits(pSource, argb, rect, dest_left, dest_top, blend_type);
}
Flush();
FX_RECT dest_rect(dest_left, dest_top, dest_left + dest_width,