Skip to content

Commit

Permalink
Do not pass texture ownership to scenegraph in WaylandSurfaceItem
Browse files Browse the repository at this point in the history
Doing so breaks many simple cases of GL rendering where there is one
attach followed by multiple damages. Letting SG destroy the GL texture
when deleting the old QSGTexture instance is wrong and results in
showing nothing but the very first frame on the screen.

Also, SurfaceBuffer does delete the GL texture upon destruction so the
ownership should stay with it.

This reverts c1ee015, not sure why
the change was introduced in the first place.

Change-Id: Ie91574daadeeb7214a55f8e32c10d0a316c0e2c8
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
  • Loading branch information
Laszlo Agocs authored and Jørgen Lind committed Aug 17, 2012
1 parent bd28cd9 commit 882b5ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compositor/compositor_api/waylandsurfaceitem.cpp
Expand Up @@ -349,7 +349,7 @@ void WaylandSurfaceItem::updateTexture()
QSGTexture *oldTexture = texture;
if (m_surface->type() == WaylandSurface::Texture) {
QOpenGLContext *context = QOpenGLContext::currentContext();
QQuickCanvas::CreateTextureOptions opt = QQuickCanvas::TextureOwnsGLTexture;
QQuickCanvas::CreateTextureOptions opt = 0;
if (useTextureAlpha()) {
opt |= QQuickCanvas::TextureHasAlphaChannel;
}
Expand Down

0 comments on commit 882b5ab

Please sign in to comment.