summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_formfill.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-04-12 15:50:49 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-12 15:50:49 +0000
commitc4242b24262d082f3ad70805aca779a3ff540c2c (patch)
tree5c9f666d4ae62ed728217bd8dcf3f3306905e328 /fpdfsdk/fpdf_formfill.cpp
parent1c23a6d78c95ff0714cda6f642420e0502edac29 (diff)
downloadpdfium-c4242b24262d082f3ad70805aca779a3ff540c2c.tar.xz
Change GetDisplayMatrix methods to take FX_RECT.
Change-Id: I079bc3bf1242fd28fdd51930d9deb6efa34d7509 Reviewed-on: https://pdfium-review.googlesource.com/30055 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_formfill.cpp')
-rw-r--r--fpdfsdk/fpdf_formfill.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/fpdfsdk/fpdf_formfill.cpp b/fpdfsdk/fpdf_formfill.cpp
index 7b47259a12..912db878f8 100644
--- a/fpdfsdk/fpdf_formfill.cpp
+++ b/fpdfsdk/fpdf_formfill.cpp
@@ -150,9 +150,8 @@ void FFLCommon(FPDF_FORMHANDLE hHandle,
return;
#endif // PDF_ENABLE_XFA
- CFX_Matrix matrix =
- pPage->GetDisplayMatrix(start_x, start_y, size_x, size_y, rotate);
- FX_RECT clip(start_x, start_y, start_x + size_x, start_y + size_y);
+ const FX_RECT rect(start_x, start_y, start_x + size_x, start_y + size_y);
+ CFX_Matrix matrix = pPage->GetDisplayMatrix(rect, rotate);
auto pDevice = pdfium::MakeUnique<CFX_DefaultRenderDevice>();
#ifdef _SKIA_SUPPORT_
@@ -162,7 +161,7 @@ void FFLCommon(FPDF_FORMHANDLE hHandle,
pDevice->Attach(holder, false, nullptr, false);
{
CFX_RenderDevice::StateRestorer restorer(pDevice.get());
- pDevice->SetClip_Rect(clip);
+ pDevice->SetClip_Rect(rect);
CPDF_RenderOptions options;
uint32_t option_flags = options.GetFlags();
@@ -182,7 +181,7 @@ void FFLCommon(FPDF_FORMHANDLE hHandle,
options.SetOCContext(
pdfium::MakeRetain<CPDF_OCContext>(pPDFDoc, CPDF_OCContext::View));
if (CPDFSDK_PageView* pPageView = pFormFillEnv->GetPageView(pPage, true))
- pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, clip);
+ pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, rect);
#else // PDF_ENABLE_XFA
options.SetOCContext(pdfium::MakeRetain<CPDF_OCContext>(
pPage->m_pDocument.Get(), CPDF_OCContext::View));