Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Unified Diff: fpdfsdk/src/fpdfview.cpp

Issue 1745243002: Pass rect by const reference in SetClip_Rect(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: LTBR. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fpdfformfill.cpp ('k') | fpdfsdk/src/fxedit/fxet_pageobjs.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfview.cpp
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index a535866889b7ee68ccd4b7957a4fb0fcc08292bc..05c69acb99739d5d6922ae8d8aebb073e961d869 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);
« no previous file with comments | « fpdfsdk/src/fpdfformfill.cpp ('k') | fpdfsdk/src/fxedit/fxet_pageobjs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698