Fixed QSGVideoNodes not deleting their materials.
Change-Id: Ia7597ade3066c23c54354e2cc36c907e6bf0dfea Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This commit is contained in:
committed by
The Qt Project
parent
59300885fd
commit
ae64113c2f
@@ -286,6 +286,7 @@ void QSGVideoMaterial_YUV420::bindTexture(int id, int w, int h, const uchar *bit
|
|||||||
QSGVideoNode_I420::QSGVideoNode_I420(const QVideoSurfaceFormat &format) :
|
QSGVideoNode_I420::QSGVideoNode_I420(const QVideoSurfaceFormat &format) :
|
||||||
m_format(format)
|
m_format(format)
|
||||||
{
|
{
|
||||||
|
setFlag(QSGNode::OwnsMaterial);
|
||||||
m_material = new QSGVideoMaterial_YUV420(format);
|
m_material = new QSGVideoMaterial_YUV420(format);
|
||||||
setMaterial(m_material);
|
setMaterial(m_material);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -249,6 +249,7 @@ public:
|
|||||||
QSGVideoNode_RGB::QSGVideoNode_RGB(const QVideoSurfaceFormat &format) :
|
QSGVideoNode_RGB::QSGVideoNode_RGB(const QVideoSurfaceFormat &format) :
|
||||||
m_format(format)
|
m_format(format)
|
||||||
{
|
{
|
||||||
|
setFlag(QSGNode::OwnsMaterial);
|
||||||
m_material = new QSGVideoMaterial_RGB(format);
|
m_material = new QSGVideoMaterial_RGB(format);
|
||||||
setMaterial(m_material);
|
setMaterial(m_material);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,6 +227,7 @@ public:
|
|||||||
QSGVideoNode_Texture::QSGVideoNode_Texture(const QVideoSurfaceFormat &format) :
|
QSGVideoNode_Texture::QSGVideoNode_Texture(const QVideoSurfaceFormat &format) :
|
||||||
m_format(format)
|
m_format(format)
|
||||||
{
|
{
|
||||||
|
setFlag(QSGNode::OwnsMaterial);
|
||||||
m_material = new QSGVideoMaterial_Texture(format);
|
m_material = new QSGVideoMaterial_Texture(format);
|
||||||
setMaterial(m_material);
|
setMaterial(m_material);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user