Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
macOS: Release main thread transaction block as soon as we're done wi…
…th it Since 9122d82 we're presenting drawables on the main thread, even those produced on the Qt Quick render thread, if we are part of a displayLayer call, as we're then presenting the Metal layer within a Core Animation transaction. We do this by assigning a block to the layer, that we then call on the main thread in displayLayer. This block retains the drawable, so when we're done calling the block we need to dispose of the block as soon as possible, to avoid stalls due to running out of drawables. To improve on this we add a local auto-release pool around the clearing of the main thread transaction block. In the case of displayLayer we need to take care to also include the referencing of the transaction block in the auto-release pool, as that makes a separate auto-released copy of the block (and hence also the drawable). Task-number: QTBUG-129839 Change-Id: I7663862c63977adab7b1f22a136416c8bc910c6e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 72e4cb9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
- Loading branch information