From e24d5a885ecde400936796b104f1950f756d90d2 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 26 Feb 2018 21:51:32 +0000 Subject: 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 Reviewed-by: dsinclair --- xfa/fwl/cfwl_widgetmgr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xfa/fwl') 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; -- cgit v1.2.3