From 765d1ebe41defa659a703a2f0ff5284c0da96a95 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 21 Mar 2018 04:36:35 +0000 Subject: Rename one ArgbEncode() variant to AlphaAndColorRefToArgb(). Mark the other ArgbEncode() variant as constexpr. Change-Id: I84207d805766e5efc669638bd8a15cfead356a41 Reviewed-on: https://pdfium-review.googlesource.com/28577 Commit-Queue: Lei Zhang Reviewed-by: dsinclair --- fpdfsdk/cpdfsdk_widget.cpp | 7 ++++--- fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp index 6d81829bc9..055ad63aa5 100644 --- a/fpdfsdk/cpdfsdk_widget.cpp +++ b/fpdfsdk/cpdfsdk_widget.cpp @@ -707,9 +707,10 @@ void CPDFSDK_Widget::DrawShadow(CFX_RenderDevice* pDevice, rcDevice.Normalize(); FX_RECT rcDev = rcDevice.ToFxRect(); - pDevice->FillRect( - &rcDev, ArgbEncode(static_cast(m_pInterForm->GetHighlightAlpha()), - m_pInterForm->GetHighlightColor(fieldType))); + pDevice->FillRect(&rcDev, + AlphaAndColorRefToArgb( + static_cast(m_pInterForm->GetHighlightAlpha()), + m_pInterForm->GetHighlightColor(fieldType))); } CFX_FloatRect CPDFSDK_Widget::GetClientRect() const { diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp index 0833759429..cb6ce1ccf8 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp @@ -596,8 +596,9 @@ FX_ARGB CPDFXFA_DocEnvironment::GetHighlightColor(CXFA_FFDoc* hDoc) { if (!pInterForm) return 0; - return ArgbEncode(pInterForm->GetHighlightAlpha(), - pInterForm->GetHighlightColor(FormFieldType::kXFA)); + return AlphaAndColorRefToArgb( + pInterForm->GetHighlightAlpha(), + pInterForm->GetHighlightColor(FormFieldType::kXFA)); } bool CPDFXFA_DocEnvironment::NotifySubmit(bool bPrevOrPost) { -- cgit v1.2.3