[PATCH 14/19] present: Add window flip mode
Michel Dänzer
michel at daenzer.net
Wed Feb 7 08:19:59 UTC 2018
On 2018-02-07 12:35 AM, Roman Gilg wrote:
> On Fri, Feb 2, 2018 at 5:11 PM, Michel Dänzer <michel at daenzer.net> wrote:
>> Taking a step back, do we even need to keep around the original pixmap
>> and unflip to it at all? I had a chat on IRC about this with Keith a
>> while ago, see the attached log excerpt.
>>
>> Keith's main concern is that the presenting client could be able to
>> read/write the window pixmap's contents behind the X server's back. I
>> understand this concern at least somewhat in the case of per-screen
>> flips, because the screen pixmap can be used for completely different
>> windows after flipping.
>>
>> But this seems irrelevant for per-window flips. In this case, the window
>> pixmap isn't used for anything else after flipping, so having direct
>> access to the pixmap doesn't allow the client to do anything it couldn't
>> do anyway using the X11 protocol. (There might be exceptions to this if
>> the window wasn't created by the presenting client, and the Security
>> extension comes into play. But that would be a rather exotic scenario,
>> so I don't think we need to consider it here.)
>
> An unflip might happen at any time when the window is reconfigured and
> the check_flip_window function returns false. Then we need again a
> pixmap for the window to paint to.
Keith agrees that no unflip is necessary at all for per-window flips.
Just set the flip pixmap as the window pixmap when flipping, and be done
with it.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the xorg-devel
mailing list