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

Unified Diff: xfa/src/fxgraphics/src/fx_graphics.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 | « xfa/src/fdp/src/fde/fde_gedevice.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fxgraphics/src/fx_graphics.cpp
diff --git a/xfa/src/fxgraphics/src/fx_graphics.cpp b/xfa/src/fxgraphics/src/fx_graphics.cpp
index 3f8c07cedffe5ba1a18abaf74fdac64d864fe34f..4b43b4547b2cce3754fd6bbf58d2fd99c2852b36 100644
--- a/xfa/src/fxgraphics/src/fx_graphics.cpp
+++ b/xfa/src/fxgraphics/src/fx_graphics.cpp
@@ -484,11 +484,11 @@ FX_ERR CFX_Graphics::SetClipRect(const CFX_RectF& rect) {
case FX_CONTEXT_Device: {
if (!_renderDevice)
return FX_ERR_Property_Invalid;
- FX_RECT r(FXSYS_round(rect.left), FXSYS_round(rect.top),
- FXSYS_round(rect.right()), FXSYS_round(rect.bottom()));
- FX_BOOL result = _renderDevice->SetClip_Rect(&r);
- if (!result)
+ if (!_renderDevice->SetClip_Rect(
+ FX_RECT(FXSYS_round(rect.left), FXSYS_round(rect.top),
+ FXSYS_round(rect.right()), FXSYS_round(rect.bottom())))) {
return FX_ERR_Method_Not_Supported;
+ }
return FX_ERR_Succeeded;
}
default: { return FX_ERR_Property_Invalid; }
« no previous file with comments | « xfa/src/fdp/src/fde/fde_gedevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698