[PATCH 1/3] present: Copy unflip contents back to the Screen Pixmap

Keith Packard keithp at keithp.com
Tue May 26 15:12:38 PDT 2015


Michel Dänzer <michel at daenzer.net> writes:

> Keith, this is also an important fix:
>
> On 06.02.2015 17:25, Chris Wilson wrote:
>> As we unflip after the flip Window no longer passes the pixel ownership
>> test for the full Screen Pixmap, we can no longer utilize that Window to
>> copy the contents back to the backing pixmap. To first flip means that
>> the Window was originally backed by the Screen Pixmap and wholly covered
>> the Pixmap, thus we need to copy the last frame contents to the Screen
>> Pixmap when the flip chain is complete.
>> 
>> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
>
> Without this fix, one can momentarily see stale screen contents when
> unflipping, e.g. when quitting a fullscreen app or switching from
> fullscreen to windowed mode.

This patch does look correct - the original code was trying to copy
the old window contents into the new window clip list before the
related window configuration operation was completed. Copying the bits
to the screen pixmap neatly routes around that ordering problem.

A more efficient fix would involve only copying regions that aren't
getting explicitly painted by various expose processing; but so few
windows use non-None backgrounds that it probably won't make any actual
difference in practice.

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20150526/bbbfcad5/attachment.sig>


More information about the xorg-devel mailing list