Commit 54d32ff9 authored by Gunnar Sletta's avatar Gunnar Sletta
Browse files

Make canvas cleanup work propertly...


Depending on which mode we are in, we need to run cleanup
on the right thread and in the right way.

Image canvas doesn't contain any GL resources and can be nuked
right away. The actual QSGTexture is managed by the node, so we
don't need to worry about it.

For FBO it is a bit more complicated.
 - Threaded: We create a cleanup handler that runs makeCurrent
   deleteTexture and doneCurrent and then release the surface
   on the GUI thread.
 - Immediate: Same as threaded, just right away
 - Cooperative: Schedule the texture to be deleted on the
   next sync. The Context doesn't have its own GL context
   in this case, so don't worry about it.

Change-Id: I2d0ae7acfa05561faa52f3cacd767eb18cabaf02
Reviewed-by: default avatarLaszlo Agocs <laszlo.agocs@digia.com>
parent 9fe218dd
No related merge requests found
Showing with 61 additions and 2 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment