From 2aa9908e24611fa6d321e694b8415ba7e8d364b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 22 Dec 2017 10:31:48 +0100 Subject: Warn when ending painting on backingstore while there's still an active painter There's no way for the backingstore to end painting on the device by itself, so we warn the user about what's going on. Failing to end painting on the device will e.g. in the case of QRasterBackingStore result in having to make a copy of the QImage data during flush. Change-Id: I3fbac2d7a8a440fdb23197ac2d57d95bfaf9e125 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/painting/qbackingstore.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui/painting') diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index 53349dcef4..afd39a6b71 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -209,6 +209,9 @@ void QBackingStore::beginPaint(const QRegion ®ion) */ void QBackingStore::endPaint() { + if (paintDevice()->paintingActive()) + qWarning() << "QBackingStore::endPaint() called with active painter on backingstore paint device"; + d_ptr->platformBackingStore->endPaint(); } -- cgit v1.2.3