diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-15 22:21:16 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-15 22:21:16 +0000 |
commit | 3e360453cded5f2f435195923ede0935f6847194 (patch) | |
tree | 3859e6c723af6fd87f4a9afb420bc9706365d7f8 /xfa | |
parent | b6e3d231ef2c28df1e5149cb16ad7046ebb0714e (diff) | |
download | pdfium-3e360453cded5f2f435195923ede0935f6847194.tar.xz |
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 <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'xfa')
-rw-r--r-- | xfa/fwl/cfwl_widget.cpp | 10 | ||||
-rw-r--r-- | xfa/fwl/cfwl_widgetmgr.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
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); } diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp index adbc895cff..42c972df98 100644 --- a/xfa/fwl/cfwl_widgetmgr.cpp +++ b/xfa/fwl/cfwl_widgetmgr.cpp @@ -424,7 +424,7 @@ void CFWL_WidgetMgr::DrawChild(CFWL_Widget* parent, if (pMatrix) widgetMatrix.Concat(*pMatrix); - widgetMatrix.Translate(rtWidget.left, rtWidget.top, true); + widgetMatrix.TranslatePrepend(rtWidget.left, rtWidget.top); if (IFWL_WidgetDelegate* pDelegate = child->GetDelegate()) pDelegate->OnDrawWidget(pGraphics, widgetMatrix); |