diff options
author | Lei Zhang <thestig@chromium.org> | 2018-04-10 19:02:15 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-10 19:02:15 +0000 |
commit | e5c3ebd923a21c6c82bd214ca27a5d7396b852c2 (patch) | |
tree | d952cc04bd711b5dd21ad2dcce7ea307024c719b /fpdfsdk | |
parent | 85ba2610cf05a75b52681f381bba2da3ba37b984 (diff) | |
download | pdfium-e5c3ebd923a21c6c82bd214ca27a5d7396b852c2.tar.xz |
Change CFX_RenderDevice::FillRect() to take FX_RECT by const-ref.
It currently takes const FX_RECT*, but the pointer is never nullptr.
Change-Id: I571e9e8dd04756bc4daa25a61a5af8d1f902914b
Reviewed-on: https://pdfium-review.googlesource.com/30052
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/cpdfsdk_widget.cpp | 3 | ||||
-rw-r--r-- | fpdfsdk/fpdf_view.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp index d2d8ecb148..8f345412cf 100644 --- a/fpdfsdk/cpdfsdk_widget.cpp +++ b/fpdfsdk/cpdfsdk_widget.cpp @@ -706,8 +706,7 @@ void CPDFSDK_Widget::DrawShadow(CFX_RenderDevice* pDevice, rcDevice.top = tmp.y; rcDevice.Normalize(); - FX_RECT rcDev = rcDevice.ToFxRect(); - pDevice->FillRect(&rcDev, + pDevice->FillRect(rcDevice.ToFxRect(), AlphaAndColorRefToArgb( static_cast<int>(m_pInterForm->GetHighlightAlpha()), m_pInterForm->GetHighlightColor(fieldType))); diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp index 655aed8141..2b4600dc8a 100644 --- a/fpdfsdk/fpdf_view.cpp +++ b/fpdfsdk/fpdf_view.cpp @@ -860,8 +860,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFBitmap_FillRect(FPDF_BITMAP bitmap, device.Attach(pBitmap, false, nullptr, false); if (!pBitmap->HasAlpha()) color |= 0xFF000000; - FX_RECT rect(left, top, left + width, top + height); - device.FillRect(&rect, color); + device.FillRect(FX_RECT(left, top, left + width, top + height), color); } FPDF_EXPORT void* FPDF_CALLCONV FPDFBitmap_GetBuffer(FPDF_BITMAP bitmap) { |