summaryrefslogtreecommitdiff
path: root/core/src/fxge/ge
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 /core/src/fxge/ge
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 'core/src/fxge/ge')
-rw-r--r--core/src/fxge/ge/fx_ge_device.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/src/fxge/ge/fx_ge_device.cpp b/core/src/fxge/ge/fx_ge_device.cpp
index 268001b285..c4f7735957 100644
--- a/core/src/fxge/ge/fx_ge_device.cpp
+++ b/core/src/fxge/ge/fx_ge_device.cpp
@@ -91,13 +91,12 @@ FX_BOOL CFX_RenderDevice::SetClip_PathStroke(
UpdateClipBox();
return TRUE;
}
-FX_BOOL CFX_RenderDevice::SetClip_Rect(const FX_RECT* pRect) {
+FX_BOOL CFX_RenderDevice::SetClip_Rect(const FX_RECT& rect) {
CFX_PathData path;
- path.AppendRect((FX_FLOAT)(pRect->left), (FX_FLOAT)(pRect->bottom),
- (FX_FLOAT)(pRect->right), (FX_FLOAT)(pRect->top));
- if (!SetClip_PathFill(&path, NULL, FXFILL_WINDING)) {
+ path.AppendRect(rect.left, rect.bottom, rect.right, rect.top);
+ if (!SetClip_PathFill(&path, nullptr, FXFILL_WINDING))
return FALSE;
- }
+
UpdateClipBox();
return TRUE;
}