Composite overlay window vs. Damage events
Aaron Plattner
aplattner at nvidia.com
Fri Mar 12 22:41:25 PST 2010
On Fri, Mar 12, 2010 at 07:01:24PM -0800, Alan Coopersmith wrote:
> I was asked by our GNOME team how to detect if Damage was not usable,
> since they've got a bug in which vino (the GNOME screen-scraping VNC
> session sharing client) doesn't update the screen when compiz is
> running, since it never gets Damage events.
>
> This struck me as strange, since I thought compiz wouldn't work without
> Damage working. Looking into it a bit, it appears the problem is that
> vino requests damage events on the root window, but never gets any once
> compiz is drawing to the Composite Overlay window instead.
>
> I hacked a bit to add a Composite protocol request to Query for the
> Overlay window (unlike GetOverlayWindow which enables it), and tried
> making vino request damage events on it instead of the root window,
> but that didn't result in any being sent to it.
>
> I've not looked deeply into the Composite Overlay window code & damage
> before - is there any known interaction here that should be breaking
> things?
>
> The bugs in question are reported at:
> http://defect.opensolaris.org/bz/show_bug.cgi?id=9790
> https://bugzilla.gnome.org/show_bug.cgi?id=593982
>
> which include a claim that this is already fixed in Xorg, but we're
> still seeing it with Xorg 1.7.5 - though admittedly using the nvidia
> closed drivers:
>
> http://bugs.freedesktop.org/show_bug.cgi?id=12255
> https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/353126
The code that generates damage events from direct-rendering OpenGL clients
incurs a bit of a performance penalty, so the nvidia driver only enables it
when it thinks it's necessary. Prior to ABI 6, it couldn't know when a
client creates damage objects, so it only turns it on when the window is
redirected. This is obviously the wrong heuristic for Compiz, so it
doesn't generate any damage events for it.
On ABI 6, the driver plugs in Damage Register/Unregister hooks and uses
those to turn on the damage tracking, which ought to work for Compiz.
However, your COW vs. Root tracking thing might still be an issue. It's
certainly also possible that there's still a bug in the driver, so if you
still aren't seeing Damage events from the COW on an ABI 6 (or 7) server
with 195.30 (or up), let me know.
-- Aaron
More information about the xorg-devel
mailing list