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 <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
Tor Arne Vestbø 2017-12-22 10:31:48 +01:00
parent 5ba29e1672
commit 2aa9908e24

View File

@ -209,6 +209,9 @@ void QBackingStore::beginPaint(const QRegion &region)
*/
void QBackingStore::endPaint()
{
if (paintDevice()->paintingActive())
qWarning() << "QBackingStore::endPaint() called with active painter on backingstore paint device";
d_ptr->platformBackingStore->endPaint();
}