Force surface repaint after is (re)created.

Every time when a surface is (re)created we must paint something in it
otherwise it will appear black.

Task-number: QTBUG-36594
Change-Id: Ib4baaef189f59a83a251cf89db30b0a3aec16d92
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
BogDan Vatra 2014-02-03 11:41:43 +02:00 committed by The Qt Project
parent 42aa8aa8c2
commit f640d3f132

View File

@ -338,6 +338,7 @@ void QAndroidPlatformScreen::surfaceChanged(JNIEnv *env, jobject surface, int w,
if (m_nativeSurface)
ANativeWindow_release(m_nativeSurface);
m_nativeSurface = ANativeWindow_fromSurface(env, surface);
QMetaObject::invokeMethod(this, "setDirty", Qt::QueuedConnection, Q_ARG(QRect, QRect(0, 0, w, h)));
} else {
if (m_nativeSurface) {
ANativeWindow_release(m_nativeSurface);