summaryrefslogtreecommitdiff
path: root/core/fxge/win32/cfx_psrenderer.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/cfx_psrenderer.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/cfx_psrenderer.cpp')
-rw-r--r--core/fxge/win32/cfx_psrenderer.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/core/fxge/win32/cfx_psrenderer.cpp b/core/fxge/win32/cfx_psrenderer.cpp
index 921005dd70..becf99b52d 100644
--- a/core/fxge/win32/cfx_psrenderer.cpp
+++ b/core/fxge/win32/cfx_psrenderer.cpp
@@ -348,7 +348,7 @@ bool CFX_PSRenderer::SetDIBits(const RetainPtr<CFX_DIBBase>& pSource,
CFX_Matrix matrix((float)(pSource->GetWidth()), 0.0f, 0.0f,
-(float)(pSource->GetHeight()), (float)(left),
(float)(top + pSource->GetHeight()));
- return DrawDIBits(pSource, color, &matrix, 0);
+ return DrawDIBits(pSource, color, matrix, 0);
}
bool CFX_PSRenderer::StretchDIBits(const RetainPtr<CFX_DIBBase>& pSource,
@@ -361,18 +361,17 @@ bool CFX_PSRenderer::StretchDIBits(const RetainPtr<CFX_DIBBase>& pSource,
StartRendering();
CFX_Matrix matrix((float)(dest_width), 0.0f, 0.0f, (float)(-dest_height),
(float)(dest_left), (float)(dest_top + dest_height));
- return DrawDIBits(pSource, color, &matrix, flags);
+ return DrawDIBits(pSource, color, matrix, flags);
}
bool CFX_PSRenderer::DrawDIBits(const RetainPtr<CFX_DIBBase>& pSource,
uint32_t color,
- const CFX_Matrix* pMatrix,
+ const CFX_Matrix& matrix,
uint32_t flags) {
StartRendering();
- if ((pMatrix->a == 0 && pMatrix->b == 0) ||
- (pMatrix->c == 0 && pMatrix->d == 0)) {
+ if ((matrix.a == 0 && matrix.b == 0) || (matrix.c == 0 && matrix.d == 0))
return true;
- }
+
if (pSource->HasAlpha())
return false;
@@ -383,8 +382,8 @@ bool CFX_PSRenderer::DrawDIBits(const RetainPtr<CFX_DIBBase>& pSource,
m_pStream->WriteString("q\n");
std::ostringstream buf;
- buf << "[" << pMatrix->a << " " << pMatrix->b << " " << pMatrix->c << " "
- << pMatrix->d << " " << pMatrix->e << " " << pMatrix->f << "]cm ";
+ buf << "[" << matrix.a << " " << matrix.b << " " << matrix.c << " "
+ << matrix.d << " " << matrix.e << " " << matrix.f << "]cm ";
int width = pSource->GetWidth();
int height = pSource->GetHeight();