summaryrefslogtreecommitdiff
path: root/xfa/fwl
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-02-26 21:51:32 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-26 21:51:32 +0000
commite24d5a885ecde400936796b104f1950f756d90d2 (patch)
treeaaed0fe0a5ac137107ef9c29a53e107c39dddccd /xfa/fwl
parent0bc02c152bd0c178a5946196e2054a5cdc7650f4 (diff)
downloadpdfium-e24d5a885ecde400936796b104f1950f756d90d2.tar.xz
Get rid of some static variables.
These are generally cheap enough to compute as needed, rather than keeping around in memory all the time (plus the memory for the static flag the compiler generates to check if initialized). Change-Id: If3a5365521f6a7781e66fb11f04883a5c673ee11 Reviewed-on: https://pdfium-review.googlesource.com/27150 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fwl')
-rw-r--r--xfa/fwl/cfwl_widgetmgr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp
index 3082b182ad..0860556665 100644
--- a/xfa/fwl/cfwl_widgetmgr.cpp
+++ b/xfa/fwl/cfwl_widgetmgr.cpp
@@ -525,10 +525,10 @@ bool CFWL_WidgetMgr::IsNeedRepaint(CFWL_Widget* pWidget,
bool bChildIntersectWithDirty = false;
bool bOrginPtIntersectWidthChild = false;
bool bOrginPtIntersectWidthDirty = rtDirty.Contains(rtWidget.TopLeft());
- static FWL_NEEDREPAINTHITDATA hitPoint[kNeedRepaintHitPoints];
- memset(hitPoint, 0, sizeof(hitPoint));
float fxPiece = rtWidget.width / kNeedRepaintHitPiece;
float fyPiece = rtWidget.height / kNeedRepaintHitPiece;
+ FWL_NEEDREPAINTHITDATA hitPoint[kNeedRepaintHitPoints];
+ memset(hitPoint, 0, sizeof(hitPoint));
hitPoint[2].hitPoint.x = hitPoint[6].hitPoint.x = rtWidget.left;
hitPoint[0].hitPoint.x = hitPoint[3].hitPoint.x = hitPoint[7].hitPoint.x =
hitPoint[10].hitPoint.x = fxPiece + rtWidget.left;