Browse Source

qt: emit `sourceChanged()` in more appropriate time in `TextureProviderObserver`

It is not deterministic relative to the time it takes to update the properties,
currently in some cases properties may be updated before `sourceChanged()` is
emitted and in some cases not, depending on the pace of the rendering and the
rendering thread.

If we signal the change immediately after the source changes, we don't have
this problem.

Currently this is asymptomatic, but better to correct it.
mmdevice-clean/8
Fatih Uzunoglu 6 months ago
committed by Steve Lhomme
parent
commit
3089d43e63
  1. 3
      modules/gui/qt/util/textureproviderobserver.cpp

3
modules/gui/qt/util/textureproviderobserver.cpp

@ -60,6 +60,7 @@ void TextureProviderObserver::setSource(const QQuickItem *source, bool enforce)
}
m_source = source;
emit sourceChanged();
if (m_source)
{
@ -109,8 +110,6 @@ void TextureProviderObserver::setSource(const QQuickItem *source, bool enforce)
else
connect(m_source, &QQuickItem::windowChanged, this, init, Qt::SingleShotConnection);
}
emit sourceChanged();
}
QSize TextureProviderObserver::textureSize() const

Loading…
Cancel
Save