diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-02-29 13:23:13 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-02-29 13:23:13 -0800 |
commit | bec4ea1e64b8049c572dd088c9c09a94f49b2353 (patch) | |
tree | 14470b439a7f963beea6aff17c72ac3321dc2e0a /fpdfsdk/src/fpdfformfill.cpp | |
parent | 3f157c7c6a5cdb92dd5df2a0b06c10ed83b472e8 (diff) | |
download | pdfium-bec4ea1e64b8049c572dd088c9c09a94f49b2353.tar.xz |
Pass rect by const reference in SetClip_Rect().
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1745243002 .
Diffstat (limited to 'fpdfsdk/src/fpdfformfill.cpp')
-rw-r--r-- | fpdfsdk/src/fpdfformfill.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/src/fpdfformfill.cpp index a14c66fbc6..c2e75c34d5 100644 --- a/fpdfsdk/src/fpdfformfill.cpp +++ b/fpdfsdk/src/fpdfformfill.cpp @@ -332,11 +332,7 @@ DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle, CFX_Matrix matrix; pPage->GetDisplayMatrix(matrix, start_x, start_y, size_x, size_y, rotate); - FX_RECT clip; - clip.left = start_x; - clip.right = start_x + size_x; - clip.top = start_y; - clip.bottom = start_y + size_y; + FX_RECT clip(start_x, start_y, start_x + size_x, start_y + size_y); #ifdef _SKIA_SUPPORT_ std::unique_ptr<CFX_SkiaDevice> pDevice(new CFX_SkiaDevice); @@ -345,7 +341,7 @@ DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle, #endif pDevice->Attach((CFX_DIBitmap*)bitmap); pDevice->SaveState(); - pDevice->SetClip_Rect(&clip); + pDevice->SetClip_Rect(clip); #ifndef PDF_ENABLE_XFA if (CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, pPage)) |