Code review comment for lp:~vanvugt/compiz/fix-unredirect-flicker

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

> "the window that compiz displays to is clipped so that it does not cover the
> area of the unredirected window"
>
> That is relevant to regional sub-suffer redraws but not relevant to buffer
> swapping. Buffer swapping will swap everything, including
> unredirected/uninitialized regions. I don't believe that the X server has a
> hook into GLX to tell the driver to clip the swapped region around
> unredirected windows.

Right, it doesn't clipped the swapped region in the application buffer (eg, compiz' output window). My contention here is that this part of the application buffer is not even visible. The bounding shape of the output window is clipped away in CompositeWindow::updateOutputWindow. If we didn't unredirect the window for instance, but still clipped it, what you'd see is just a blank area of the screen where the unredirected window should be.

The only reason I'm asking is because requiring partial copies may still be relevant if we need to ensure that this part of the OpenGL buffer (eg, not the visible part of the X output window) must remain untouched even while it is invisible.

>
> So why don't we see flickering all the time?...
> With a single monitor, it /appears/ to mostly work either by luck or by design
> of the X server to ensure that unredirected windows are painted immediately
> after the buffer swap, but before vertical retrace. Either way, I can't find a
> documented reason why it behaves that way, or why it should work without
> flickering, ever.

These windows are painted separately, in a region where X does not draw our output window to the screen.

« Back to merge proposal