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>
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index e2c058c..d4a67be 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -2454,7 +2454,7 @@
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 @@
}
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 @@
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 f7db096..e3a48b1 100644
--- a/core/fxge/skia/fx_skia_device.h
+++ b/core/fxge/skia/fx_skia_device.h
@@ -126,7 +126,7 @@
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,