summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-09 19:13:55 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-09 19:13:55 +0000
commit09ee087b894679ff7bc6bc17c7e8a8410e00f8b5 (patch)
tree7558e4680970e1657c9769785317d3d63cd6de69 /fpdfsdk/formfiller
parentf9718052794c4669a4f99d8f798806c9730a9e36 (diff)
downloadpdfium-09ee087b894679ff7bc6bc17c7e8a8410e00f8b5.tar.xz
Pass CFX_Matrix by const-ref in various OnDraw() methods.
Change-Id: I6e953206520c024b2fc23b9b60c5c43112d04896 Reviewed-on: https://pdfium-review.googlesource.com/c/43603 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/formfiller')
-rw-r--r--fpdfsdk/formfiller/cffl_interactiveformfiller.cpp10
-rw-r--r--fpdfsdk/formfiller/cffl_interactiveformfiller.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
index d76ce99578..cef2a45011 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
@@ -56,7 +56,7 @@ FX_RECT CFFL_InteractiveFormFiller::GetViewBBox(CPDFSDK_PageView* pPageView,
void CFFL_InteractiveFormFiller::OnDraw(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
CFX_RenderDevice* pDevice,
- CFX_Matrix* pUser2Device) {
+ const CFX_Matrix& mtUser2Device) {
ASSERT(pPageView);
CPDFSDK_Widget* pWidget = ToCPDFSDKWidget(pAnnot);
if (!IsVisible(pWidget))
@@ -64,7 +64,7 @@ void CFFL_InteractiveFormFiller::OnDraw(CPDFSDK_PageView* pPageView,
CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false);
if (pFormFiller && pFormFiller->IsValid()) {
- pFormFiller->OnDraw(pPageView, pAnnot, pDevice, *pUser2Device);
+ pFormFiller->OnDraw(pPageView, pAnnot, pDevice, mtUser2Device);
pAnnot->GetPDFPage();
if (m_pFormFillEnv->GetFocusAnnot() != pAnnot)
return;
@@ -89,16 +89,16 @@ void CFFL_InteractiveFormFiller::OnDraw(CPDFSDK_PageView* pPageView,
gsd.m_DashArray = {1.0f};
gsd.m_DashPhase = 0;
gsd.m_LineWidth = 1.0f;
- pDevice->DrawPath(&path, pUser2Device, &gsd, 0, ArgbEncode(255, 0, 0, 0),
+ pDevice->DrawPath(&path, &mtUser2Device, &gsd, 0, ArgbEncode(255, 0, 0, 0),
FXFILL_ALTERNATE);
return;
}
pFormFiller = GetFormFiller(pAnnot, false);
if (pFormFiller) {
- pFormFiller->OnDrawDeactive(pPageView, pAnnot, pDevice, *pUser2Device);
+ pFormFiller->OnDrawDeactive(pPageView, pAnnot, pDevice, mtUser2Device);
} else {
- pWidget->DrawAppearance(pDevice, *pUser2Device, CPDF_Annot::Normal,
+ pWidget->DrawAppearance(pDevice, mtUser2Device, CPDF_Annot::Normal,
nullptr);
}
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.h b/fpdfsdk/formfiller/cffl_interactiveformfiller.h
index 46248d651b..bf9fa3c09c 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.h
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.h
@@ -34,7 +34,7 @@ class CFFL_InteractiveFormFiller final : public IPWL_Filler_Notify {
void OnDraw(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
CFX_RenderDevice* pDevice,
- CFX_Matrix* pUser2Device);
+ const CFX_Matrix& mtUser2Device);
void OnDelete(CPDFSDK_Annot* pAnnot);