summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-08-23 14:50:02 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-08-25 23:14:40 +0200
commit9b3935492bfa33bc716129cb303d3ac62be5bb07 (patch)
tree0cb74d764c7e760cd0baaea0d62866701e23c321 /src
parent74be54684c187ba600488cb157a23c6bb072909d (diff)
widgets: Remove unused QWidgetRepaintManager::dirtyRegion
It is no longer needed after qt_dirtyRegion was removed in e2a1fb901. Change-Id: I120df76b08808842b304cb8de10de23ccd0e2845 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/kernel/qwidgetrepaintmanager.cpp50
-rw-r--r--src/widgets/kernel/qwidgetrepaintmanager_p.h1
2 files changed, 0 insertions, 51 deletions
diff --git a/src/widgets/kernel/qwidgetrepaintmanager.cpp b/src/widgets/kernel/qwidgetrepaintmanager.cpp
index c05e3d1701..10feb4a918 100644
--- a/src/widgets/kernel/qwidgetrepaintmanager.cpp
+++ b/src/widgets/kernel/qwidgetrepaintmanager.cpp
@@ -1292,56 +1292,6 @@ bool QWidgetRepaintManager::isDirty() const
}
/*!
- Returns the region (in top-level coordinates) that needs repaint and/or flush.
-
- If the widget is non-zero, only the dirty region for the widget is returned
- and the region will be in widget coordinates.
-*/
-QRegion QWidgetRepaintManager::dirtyRegion(QWidget *widget) const
-{
- const bool widgetDirty = widget && widget != tlw;
- const QRect tlwRect(topLevelRect());
- const QRect surfaceGeometry(tlwRect.topLeft(), store->size());
- if (surfaceGeometry != tlwRect && surfaceGeometry.size() != tlwRect.size()) {
- if (widgetDirty) {
- const QRect dirtyTlwRect = QRect(QPoint(), tlwRect.size());
- const QPoint offset(widget->mapTo(tlw, QPoint()));
- const QRect dirtyWidgetRect(dirtyTlwRect & widget->rect().translated(offset));
- return dirtyWidgetRect.translated(-offset);
- }
- return QRect(QPoint(), tlwRect.size());
- }
-
- // Calculate the region that needs repaint.
- QRegion r(dirty);
- for (int i = 0; i < dirtyWidgets.size(); ++i) {
- QWidget *w = dirtyWidgets.at(i);
- if (widgetDirty && w != widget && !widget->isAncestorOf(w))
- continue;
- r += w->d_func()->dirty.translated(w->mapTo(tlw, QPoint()));
- }
-
- // Append the region that needs flush.
- r += topLevelNeedsFlush;
-
- for (QWidget *w : needsFlushWidgets) {
- if (widgetDirty && w != widget && !widget->isAncestorOf(w))
- continue;
- QWidgetPrivate *wd = w->d_func();
- Q_ASSERT(wd->needsFlush);
- r += wd->needsFlush->translated(w->mapTo(tlw, QPoint()));
- }
-
- if (widgetDirty) {
- // Intersect with the widget geometry and translate to its coordinates.
- const QPoint offset(widget->mapTo(tlw, QPoint()));
- r &= widget->rect().translated(offset);
- r.translate(-offset);
- }
- return r;
-}
-
-/*!
Invalidates the backing store when the widget is resized.
Static areas are never invalidated unless absolutely needed.
*/
diff --git a/src/widgets/kernel/qwidgetrepaintmanager_p.h b/src/widgets/kernel/qwidgetrepaintmanager_p.h
index c9114c6955..4ca5e95f24 100644
--- a/src/widgets/kernel/qwidgetrepaintmanager_p.h
+++ b/src/widgets/kernel/qwidgetrepaintmanager_p.h
@@ -119,7 +119,6 @@ private:
void flush(QWidget *widget, const QRegion &region, QPlatformTextureList *widgetTextures);
bool isDirty() const;
- QRegion dirtyRegion(QWidget *widget = nullptr) const;
bool hasStaticContents() const;
void updateStaticContentsSize();