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

Michel Dänzer michel at daenzer.net
Tue May 26 23:34:49 PDT 2015


On 27.05.2015 07:12, Keith Packard wrote:
> 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.

Also, while that might be slightly more efficient, it might again make
stale contents momentarily visible on unflip?


Anyway, thanks for pushing this fix, but I hope you realize that the
hangs fixed by the other patch we're discussing are far more severe.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the xorg-devel mailing list