summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-08-21 15:25:39 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-08-22 09:44:53 +0200
commita8cc4cea92bfe4c251458722cbd2e60c49024a2d (patch)
tree5d9267d52f8ac1a134d5bf3b07a396deefe75537 /src/widgets/kernel
parenta0484b8277f142e8a8c06fd1e6c840694f88f7fa (diff)
widgets: Merge QWidgetRepaintManager::begin/endPaint into callsite
Change-Id: Iff5f78dcc8124bcecf53d42d920e74467937412a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qwidgetrepaintmanager.cpp28
-rw-r--r--src/widgets/kernel/qwidgetrepaintmanager_p.h3
2 files changed, 7 insertions, 24 deletions
diff --git a/src/widgets/kernel/qwidgetrepaintmanager.cpp b/src/widgets/kernel/qwidgetrepaintmanager.cpp
index 183337b693..96f440cd0f 100644
--- a/src/widgets/kernel/qwidgetrepaintmanager.cpp
+++ b/src/widgets/kernel/qwidgetrepaintmanager.cpp
@@ -90,25 +90,6 @@ bool QWidgetRepaintManager::bltRect(const QRect &rect, int dx, int dy, QWidget *
}
/*!
- Prepares the window surface to paint a\ toClean region of the \a widget.
-
- The \a toClean region might be clipped by the window surface.
-*/
-void QWidgetRepaintManager::beginPaint(QRegion &toClean, QBackingStore *backingStore)
-{
- // Always flush repainted areas.
- dirtyOnScreen += toClean;
-
- backingStore->beginPaint(toClean);
-}
-
-void QWidgetRepaintManager::endPaint(QBackingStore *backingStore)
-{
- backingStore->endPaint();
- flush();
-}
-
-/*!
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
@@ -1048,7 +1029,10 @@ void QWidgetRepaintManager::paintAndFlush()
}
#endif
- beginPaint(toClean, store);
+ // Always flush repainted areas
+ dirtyOnScreen += toClean;
+
+ store->beginPaint(toClean);
// Must do this before sending any paint events because
// the size may change in the paint event.
@@ -1084,7 +1068,9 @@ void QWidgetRepaintManager::paintAndFlush()
tlw->d_func()->drawWidget(store->paintDevice(), dirtyCopy, QPoint(), flags, 0, this);
}
- endPaint(store);
+ store->endPaint();
+
+ flush();
}
/*!
diff --git a/src/widgets/kernel/qwidgetrepaintmanager_p.h b/src/widgets/kernel/qwidgetrepaintmanager_p.h
index 50f45afcd4..d0368b2232 100644
--- a/src/widgets/kernel/qwidgetrepaintmanager_p.h
+++ b/src/widgets/kernel/qwidgetrepaintmanager_p.h
@@ -180,9 +180,6 @@ private:
void flush(QWidget *widget = nullptr);
void flush(QWidget *widget, const QRegion &region, QPlatformTextureList *widgetTextures);
- void beginPaint(QRegion &toClean, QBackingStore *backingStore);
- void endPaint(QBackingStore *backingStore);
-
QRegion dirtyRegion(QWidget *widget = nullptr) const;
void updateLists(QWidget *widget);