summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-25 20:23:54 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-25 20:23:54 +0000
commitf3aa7fda02121be974d0e025004ef0bb9ae291a8 (patch)
treeac4f9d4fce443bec9417dd5b5e2192e0215cd42c
parent5ada7bcf1f200eaa8d78ea2c74233b6b54f6d5f5 (diff)
downloadpdfium-f3aa7fda02121be974d0e025004ef0bb9ae291a8.tar.xz
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 <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
-rw-r--r--core/fxge/skia/fx_skia_device.cpp6
-rw-r--r--core/fxge/skia/fx_skia_device.h2
2 files changed, 4 insertions, 4 deletions
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<CFX_DIBBase>& pSource,
const RetainPtr<CFX_DIBBase>& pMask,
int bitmap_alpha,
- const CFX_Matrix* pMatrix,
+ const CFX_Matrix& matrix,
BlendMode blend_type) {
DebugValidate(m_pBitmap, m_pBackdropBitmap);
std::unique_ptr<uint8_t, FxFreeDeleter> 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<CFX_DIBBase>& pBitmap,
const RetainPtr<CFX_DIBBase>& pMask,
int bitmap_alpha,
- const CFX_Matrix* pMatrix,
+ const CFX_Matrix& matrix,
BlendMode blend_type);
bool DrawDeviceText(int nChars,