From 3e360453cded5f2f435195923ede0935f6847194 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 15 Aug 2018 22:21:16 +0000 Subject: Remove optional prepend argument from matrix transformations. Callers always want one form or the other, so split into separate methods. This may save some branching. Remove forms that are not used. Put more helpful helper function in .cpp file. Change-Id: I4e025de7f69ce3f323cd290a5dc8202dd4f8ca07 Reviewed-on: https://pdfium-review.googlesource.com/40270 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- xfa/fwl/cfwl_widget.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'xfa/fwl/cfwl_widget.cpp') diff --git a/xfa/fwl/cfwl_widget.cpp b/xfa/fwl/cfwl_widget.cpp index d0dbab10d5..4a8f2c0caa 100644 --- a/xfa/fwl/cfwl_widget.cpp +++ b/xfa/fwl/cfwl_widget.cpp @@ -191,12 +191,12 @@ CFX_Matrix CFWL_Widget::GetMatrix() { if (parent->m_pProperties) ctmOnParent.SetIdentity(); rect = parent->GetWidgetRect(); - matrix.Concat(ctmOnParent, true); - matrix.Translate(rect.left, rect.top, true); + matrix.ConcatPrepend(ctmOnParent); + matrix.TranslatePrepend(rect.left, rect.top); } CFX_Matrix m; m.SetIdentity(); - matrix.Concat(m, true); + matrix.ConcatPrepend(m); parents.clear(); return matrix; } @@ -386,7 +386,7 @@ void CFWL_Widget::DrawBackground(CXFA_Graphics* pGraphics, param.m_iPart = iPartBk; param.m_pGraphics = pGraphics; if (pMatrix) - param.m_matrix.Concat(*pMatrix, true); + param.m_matrix.ConcatPrepend(*pMatrix); param.m_rtPart = GetRelativeRect(); pTheme->DrawBackground(¶m); } @@ -399,7 +399,7 @@ void CFWL_Widget::DrawBorder(CXFA_Graphics* pGraphics, param.m_pWidget = this; param.m_iPart = iPartBorder; param.m_pGraphics = pGraphics; - param.m_matrix.Concat(matrix, true); + param.m_matrix.ConcatPrepend(matrix); param.m_rtPart = GetRelativeRect(); pTheme->DrawBackground(¶m); } -- cgit v1.2.3