From f3aa7fda02121be974d0e025004ef0bb9ae291a8 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 25 Oct 2018 20:23:54 +0000 Subject: Change DrawBitsWithMask() to take a matrix by const-ref. In CFX_SkiaDeviceDriver. Change-Id: Ie19c258fdffc0844b2210aec484b7e71a5ba52d0 Reviewed-on: https://pdfium-review.googlesource.com/c/44553 Commit-Queue: Lei Zhang Reviewed-by: Tom Sepez --- core/fxge/skia/fx_skia_device.cpp | 6 +++--- core/fxge/skia/fx_skia_device.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'core') diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp index e2c058c1bd..d4a67be98a 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -2454,7 +2454,7 @@ bool CFX_SkiaDeviceDriver::DrawBitsWithMask( const RetainPtr& pSource, const RetainPtr& pMask, int bitmap_alpha, - const CFX_Matrix* pMatrix, + const CFX_Matrix& matrix, BlendMode blend_type) { DebugValidate(m_pBitmap, m_pBackdropBitmap); std::unique_ptr src8Storage, mask8Storage; @@ -2471,7 +2471,7 @@ bool CFX_SkiaDeviceDriver::DrawBitsWithMask( } m_pCanvas->save(); SkMatrix skMatrix; - SetBitmapMatrix(*pMatrix, srcWidth, srcHeight, &skMatrix); + SetBitmapMatrix(matrix, srcWidth, srcHeight, &skMatrix); m_pCanvas->concat(skMatrix); SkPaint paint; SetBitmapPaint(pSource->IsAlphaMask(), 0xFFFFFFFF, bitmap_alpha, blend_type, @@ -2502,7 +2502,7 @@ bool CFX_SkiaDeviceDriver::SetBitsWithMask( return true; CFX_Matrix m(pBitmap->GetWidth(), 0, 0, -pBitmap->GetHeight(), dest_left, dest_top + pBitmap->GetHeight()); - return DrawBitsWithMask(pBitmap, pMask, bitmap_alpha, &m, blend_type); + return DrawBitsWithMask(pBitmap, pMask, bitmap_alpha, m, blend_type); } void CFX_SkiaDeviceDriver::Clear(uint32_t color) { diff --git a/core/fxge/skia/fx_skia_device.h b/core/fxge/skia/fx_skia_device.h index f7db096d30..e3a48b19d1 100644 --- a/core/fxge/skia/fx_skia_device.h +++ b/core/fxge/skia/fx_skia_device.h @@ -126,7 +126,7 @@ class CFX_SkiaDeviceDriver final : public RenderDeviceDriverIface { bool DrawBitsWithMask(const RetainPtr& pBitmap, const RetainPtr& pMask, int bitmap_alpha, - const CFX_Matrix* pMatrix, + const CFX_Matrix& matrix, BlendMode blend_type); bool DrawDeviceText(int nChars, -- cgit v1.2.3