Remove CFWL_WidgetMgr::Item::iRedrawCounter.
Although it is incremented and cleared in spots, its value
doesn't affect anything.
Change-Id: Ia79ce4c633b230989d29dba062bf5b05b93d8d56
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/72790
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp
index fccab7e..df99bae 100644
--- a/xfa/fwl/cfwl_widgetmgr.cpp
+++ b/xfa/fwl/cfwl_widgetmgr.cpp
@@ -77,7 +77,6 @@
pNative = pOuter;
pOuter = pOuter->GetOuter();
}
- AddRedrawCounts(pNative);
m_pAdapter->RepaintWidget(pNative);
}
@@ -146,14 +145,6 @@
return nullptr;
}
-void CFWL_WidgetMgr::AddRedrawCounts(CFWL_Widget* pWidget) {
- GetWidgetMgrItem(pWidget)->iRedrawCounter++;
-}
-
-void CFWL_WidgetMgr::ResetRedrawCounts(CFWL_Widget* pWidget) {
- GetWidgetMgrItem(pWidget)->iRedrawCounter = 0;
-}
-
CFWL_WidgetMgr::Item* CFWL_WidgetMgr::GetWidgetMgrRootItem() const {
return GetWidgetMgrItem(nullptr);
}
@@ -202,8 +193,6 @@
CFX_RectF clipBounds = pGraphics->GetClipRect();
if (!clipBounds.IsEmpty())
DrawChildren(pWidget, clipBounds, pGraphics, &matrix);
-
- ResetRedrawCounts(pWidget);
}
void CFWL_WidgetMgr::DrawChildren(CFWL_Widget* parent,
diff --git a/xfa/fwl/cfwl_widgetmgr.h b/xfa/fwl/cfwl_widgetmgr.h
index 7bb0f11..e4cbe0e 100644
--- a/xfa/fwl/cfwl_widgetmgr.h
+++ b/xfa/fwl/cfwl_widgetmgr.h
@@ -53,8 +53,6 @@
const CFX_PointF& point) const;
CFWL_Widget* GetDefaultButton(CFWL_Widget* pParent) const;
- void AddRedrawCounts(CFWL_Widget* pWidget);
-
void GetAdapterPopupPos(CFWL_Widget* pWidget,
float fMinHeight,
float fMaxHeight,
@@ -69,7 +67,6 @@
~Item() final;
CFWL_Widget* const pWidget;
- int32_t iRedrawCounter = 0;
};
CFWL_Widget* GetPriorSiblingWidget(CFWL_Widget* pWidget) const;
@@ -79,7 +76,6 @@
Item* GetWidgetMgrItem(const CFWL_Widget* pWidget) const;
Item* CreateWidgetMgrItem(CFWL_Widget* pWidget);
- void ResetRedrawCounts(CFWL_Widget* pWidget);
void DrawChildren(CFWL_Widget* pParent,
const CFX_RectF& rtClip,
CXFA_Graphics* pGraphics,