summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/widgets/kernel/qwidgetbackingstore.cpp11
-rw-r--r--src/widgets/kernel/qwidgetbackingstore_p.h3
2 files changed, 11 insertions, 3 deletions
diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp
index 6cfe6a6b35..43e2ccdf0b 100644
--- a/src/widgets/kernel/qwidgetbackingstore.cpp
+++ b/src/widgets/kernel/qwidgetbackingstore.cpp
@@ -78,9 +78,11 @@ void QWidgetBackingStore::qt_flush(QWidget *widget, const QRegion &region, QBack
{
#ifdef QT_NO_OPENGL
Q_UNUSED(widgetTextures);
+ Q_ASSERT(!region.isEmpty());
+#else
+ Q_ASSERT(!region.isEmpty() || (widgetTextures && widgetTextures->count()));
#endif
Q_ASSERT(widget);
- Q_ASSERT(!region.isEmpty() || (widgetTextures && widgetTextures->count()));
Q_ASSERT(backingStore);
Q_ASSERT(tlw);
@@ -749,8 +751,9 @@ QWidgetBackingStore::~QWidgetBackingStore()
for (int c = 0; c < dirtyWidgets.size(); ++c) {
resetWidget(dirtyWidgets.at(c));
}
-
+#ifndef QT_NO_OPENGL
delete dirtyOnScreenWidgets;
+#endif
dirtyOnScreenWidgets = 0;
}
@@ -959,7 +962,6 @@ static void findTextureWidgetsRecursively(QWidget *tlw, QWidget *widget, QPlatfo
findTextureWidgetsRecursively(tlw, w, widgetTextures);
}
}
-#endif
QPlatformTextureListWatcher::QPlatformTextureListWatcher(QWidgetBackingStore *backingStore)
: m_locked(false),
@@ -979,6 +981,7 @@ void QPlatformTextureListWatcher::onLockStatusChanged(bool locked)
if (!locked)
m_backingStore->sync();
}
+#endif // QT_NO_OPENGL
/*!
Synchronizes the backing store, i.e. dirty areas are repainted and flushed.
@@ -1003,6 +1006,7 @@ void QWidgetBackingStore::sync()
return;
}
+#ifndef QT_NO_OPENGL
if (textureListWatcher && !textureListWatcher->isLocked()) {
textureListWatcher->deleteLater();
textureListWatcher = 0;
@@ -1013,6 +1017,7 @@ void QWidgetBackingStore::sync()
textureListWatcher->watch(widgetTextures);
return;
}
+#endif
doSync();
}
diff --git a/src/widgets/kernel/qwidgetbackingstore_p.h b/src/widgets/kernel/qwidgetbackingstore_p.h
index 9c8ed3d5ca..e362ee4ac1 100644
--- a/src/widgets/kernel/qwidgetbackingstore_p.h
+++ b/src/widgets/kernel/qwidgetbackingstore_p.h
@@ -61,6 +61,7 @@
QT_BEGIN_NAMESPACE
class QPlatformTextureList;
+class QPlatformTextureListWatcher;
class QWidgetBackingStore;
struct BeginPaintInfo {
@@ -70,6 +71,7 @@ struct BeginPaintInfo {
uint backingStoreRecreated : 1;
};
+#ifndef QT_NO_OPENGL
class QPlatformTextureListWatcher : public QObject
{
Q_OBJECT
@@ -86,6 +88,7 @@ private:
bool m_locked;
QWidgetBackingStore *m_backingStore;
};
+#endif
class Q_AUTOTEST_EXPORT QWidgetBackingStore
{