summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfview.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-02-29 13:23:13 -0800
committerTom Sepez <tsepez@chromium.org>2016-02-29 13:23:13 -0800
commitbec4ea1e64b8049c572dd088c9c09a94f49b2353 (patch)
tree14470b439a7f963beea6aff17c72ac3321dc2e0a /fpdfsdk/src/fpdfview.cpp
parent3f157c7c6a5cdb92dd5df2a0b06c10ed83b472e8 (diff)
downloadpdfium-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/fpdfview.cpp')
-rw-r--r--fpdfsdk/src/fpdfview.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index a535866889..05c69acb99 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -891,13 +891,9 @@ void FPDF_RenderPage_Retail(CRenderContext* pContext,
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;
pContext->m_pDevice->SaveState();
- pContext->m_pDevice->SetClip_Rect(&clip);
+ pContext->m_pDevice->SetClip_Rect(
+ FX_RECT(start_x, start_y, start_x + size_x, start_y + size_y));
pContext->m_pContext = new CPDF_RenderContext(pPage);
pContext->m_pContext->AppendLayer(pPage, &matrix);