29 disconnect(m_input,
nullptr,
this,
nullptr);
33 if (QQuickImage *image = qobject_cast<QQuickImage *>(m_input)) {
34 connect(image, &QQuickImage::sourceSizeChanged,
this, &QGfxSourceProxyME::repolish);
35 connect(image, &QQuickImage::fillModeChanged,
this, &QGfxSourceProxyME::repolish);
37 connect(m_input, &QQuickItem::childrenChanged,
this, &QGfxSourceProxyME::repolish);
39 Q_EMIT inputChanged();
104 QQuickImage *image = qobject_cast<QQuickImage *>(m_input);
105 QQuickShaderEffectSource *shaderSource = qobject_cast<QQuickShaderEffectSource *>(m_input);
106 bool childless = m_input->childItems().size() == 0;
107 bool interpOk = m_interpolation == Interpolation::Any
108 || (m_interpolation == Interpolation::Linear && m_input->smooth() ==
true)
109 || (m_interpolation == Interpolation::Nearest && m_input->smooth() ==
false);
114 QObject *layer = findLayer(m_input);
115 if (!layer && shaderSource) {
120 layer = findLayer(shaderSource->sourceItem());
125 bool padded = m_sourceRect.x() < 0 || m_sourceRect.y() < 0;
134 layer->setProperty(
"sourceRect", m_sourceRect);
135 layer->setProperty(
"smooth", m_interpolation != Interpolation::Nearest);
138 }
else if (childless && interpOk) {
140 if (shaderSource->sourceRect() == m_sourceRect || m_sourceRect.isEmpty())
143 }
else if (!padded && ((image && image->fillMode() == QQuickImage::Stretch && !image->sourceSize().isNull())
144 || (!image && m_input->isTextureProvider())
157 if (m_proxy && m_output == m_input) {