summaryrefslogtreecommitdiff
path: root/core/fxge/win32/fx_win32_print.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-25 19:28:10 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-25 19:28:10 +0000
commit5ada7bcf1f200eaa8d78ea2c74233b6b54f6d5f5 (patch)
treed30f97e0b55be2a3ca3b720e80e075d36f11e941 /core/fxge/win32/fx_win32_print.cpp
parent0c327657fb8c23934c5beae520e7a97a48e2eef6 (diff)
downloadpdfium-5ada7bcf1f200eaa8d78ea2c74233b6b54f6d5f5.tar.xz
Change StartDIBits() to take a matrix by reference.
In RenderDeviceDriverIface and related classes, and for related methods in the call stack. Change-Id: I420fafe70084eb3941dffc6f9f51ecbed79581de Reviewed-on: https://pdfium-review.googlesource.com/c/44552 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.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/core/fxge/win32/fx_win32_print.cpp b/core/fxge/win32/fx_win32_print.cpp
index 1f9b9510f7..b92a46d08f 100644
--- a/core/fxge/win32/fx_win32_print.cpp
+++ b/core/fxge/win32/fx_win32_print.cpp
@@ -161,7 +161,7 @@ bool CGdiPrinterDriver::StretchDIBits(const RetainPtr<CFX_DIBBase>& pSource,
bool CGdiPrinterDriver::StartDIBits(const RetainPtr<CFX_DIBBase>& pSource,
int bitmap_alpha,
uint32_t color,
- const CFX_Matrix* pMatrix,
+ const CFX_Matrix& matrix,
uint32_t render_flags,
std::unique_ptr<CFX_ImageRenderer>* handle,
BlendMode blend_type) {
@@ -169,12 +169,12 @@ bool CGdiPrinterDriver::StartDIBits(const RetainPtr<CFX_DIBBase>& pSource,
(pSource->IsAlphaMask() && (pSource->GetBPP() != 1))) {
return false;
}
- CFX_FloatRect unit_rect = pMatrix->GetUnitRect();
+ CFX_FloatRect unit_rect = matrix.GetUnitRect();
FX_RECT full_rect = unit_rect.GetOuterRect();
- if (fabs(pMatrix->b) < 0.5f && pMatrix->a != 0 && fabs(pMatrix->c) < 0.5f &&
- pMatrix->d != 0) {
- bool bFlipX = pMatrix->a < 0;
- bool bFlipY = pMatrix->d > 0;
+ if (fabs(matrix.b) < 0.5f && matrix.a != 0 && fabs(matrix.c) < 0.5f &&
+ matrix.d != 0) {
+ bool bFlipX = matrix.a < 0;
+ bool bFlipY = matrix.d > 0;
return StretchDIBits(pSource, color,
bFlipX ? full_rect.right : full_rect.left,
bFlipY ? full_rect.bottom : full_rect.top,
@@ -182,11 +182,11 @@ bool CGdiPrinterDriver::StartDIBits(const RetainPtr<CFX_DIBBase>& pSource,
bFlipY ? -full_rect.Height() : full_rect.Height(),
nullptr, 0, blend_type);
}
- if (fabs(pMatrix->a) >= 0.5f || fabs(pMatrix->d) >= 0.5f)
+ if (fabs(matrix.a) >= 0.5f || fabs(matrix.d) >= 0.5f)
return false;
RetainPtr<CFX_DIBitmap> pTransformed =
- pSource->SwapXY(pMatrix->c > 0, pMatrix->b < 0);
+ pSource->SwapXY(matrix.c > 0, matrix.b < 0);
if (!pTransformed)
return false;
@@ -482,7 +482,7 @@ bool CPSPrinterDriver::StretchDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
bool CPSPrinterDriver::StartDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
int bitmap_alpha,
uint32_t color,
- const CFX_Matrix* pMatrix,
+ const CFX_Matrix& matrix,
uint32_t render_flags,
std::unique_ptr<CFX_ImageRenderer>* handle,
BlendMode blend_type) {
@@ -493,7 +493,7 @@ bool CPSPrinterDriver::StartDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
return false;
*handle = nullptr;
- return m_PSRenderer.DrawDIBits(pBitmap, color, pMatrix, render_flags);
+ return m_PSRenderer.DrawDIBits(pBitmap, color, matrix, render_flags);
}
bool CPSPrinterDriver::DrawDeviceText(int nChars,
@@ -598,7 +598,7 @@ bool CTextOnlyPrinterDriver::StartDIBits(
const RetainPtr<CFX_DIBBase>& pBitmap,
int bitmap_alpha,
uint32_t color,
- const CFX_Matrix* pMatrix,
+ const CFX_Matrix& matrix,
uint32_t render_flags,
std::unique_ptr<CFX_ImageRenderer>* handle,
BlendMode blend_type) {