summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget_p.h
diff options
context:
space:
mode:
authorBłażej Szczygieł <spaz16@wp.pl>2017-11-10 23:52:17 +0100
committerBłażej Szczygieł <spaz16@wp.pl>2018-04-17 06:32:52 +0000
commit5b09346cf4322704a866f253b911d467c40df3ba (patch)
tree0b61b5548ac8dae08609bd349d241b2bc1f16f35 /src/widgets/kernel/qwidget_p.h
parent98ad498a46471d43a745cc61fd53e08e8a6b56dc (diff)
Widgets: Use accelerated scroll when scrolled widget is overlapped
Get region of overlapped widgets and scroll only non-overlapped parts of image. Next, schedule an update for overlapped widgets region. This patch improves scrolling performance when scrolled widget has overlapped widgets. Common use cases: - faster scrolling when using "StyleHint::SH_ScrollBar_Transient", - faster scrolling of zoomed image with semi-transparent thumbnail. Accelerated scrolling with overlapped widgets is not available when scale factor is non-integer. Task-number: QTBUG-64504 Change-Id: I8337d3bc756e50f7d31cdc7979ccf86dc5c3695f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/widgets/kernel/qwidget_p.h')
-rw-r--r--src/widgets/kernel/qwidget_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h
index c39333161b..fae9e5ff4e 100644
--- a/src/widgets/kernel/qwidget_p.h
+++ b/src/widgets/kernel/qwidget_p.h
@@ -453,7 +453,7 @@ public:
// ### Qt 4.6: Merge into a template function (after MSVC isn't supported anymore).
void invalidateBuffer(const QRegion &);
void invalidateBuffer(const QRect &);
- bool isOverlapped(const QRect&) const;
+ QRegion overlappedRegion(const QRect &rect, bool breakAfterFirst = false) const;
void syncBackingStore();
void syncBackingStore(const QRegion &region);