Tor Arne Vestbø 38130406ca macOS: Don't defer back/front-buffer swap in CALayer backingstore
CoreAnimation doesn't immediately mark a surface as in use the moment
we assign it to a layer, but defers it until the surface has bee picked
up by the window server. In theory this would allow us to defer the swap
until the next beginPaint(), which would allow painting to the back buffer
again before Core Animation has time to flush the transaction and persist
the layer changes to the window server, and would also automatically deal
with requests to flush without painting anything.

But, since a client may do several rounds of beginPaint/endPaint before
flushing, we might end up in a situation where we detect that a surface
is in use in the middle of several paint rounds, and end up swapping in
a new back buffer without copying over the previously painted content,
like we do in prepareForFlush. To be on the safe side we swap the back
and front buffer straight away.

We also need to mark the surface in use, to prevent the same problem
from appearing when the window server doesn't pick up the surface in
between two rounds of flushes.

Pick-to: 6.2
Change-Id: Ib418852424773c399df710da33a388e8d2c2e92c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
2021-11-08 19:04:59 +01:00
2021-11-04 18:01:39 +01:00
2021-10-05 11:30:06 +10:00
2020-11-16 10:02:08 +02:00
2015-08-18 19:59:14 +00:00
2021-11-08 17:05:25 +01:00
2012-09-07 15:39:31 +02:00
2021-10-05 11:30:06 +10:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%