xserver-multidpi/composite
Adam Jackson 5d6ad0d3a7 res: Fix accounting of redirected window pixmaps for Composite
The previous change removed the special case that matched resources of
CompositeClientWindowType and walked back from that to the window
pixmap. That was intentional, since that logic was broken anyway. CCWTs
don't map 1:1 to references on the backing pixmap; a window redirected
by multiple clients (say, by the server since it's on the synthetic
visual, and then manually by a compositor) would have a window pixmap
refcount of 1, but would have those bytes accounted twice.

The right thing is to have Composite wrap window accounting, and add the
pixmap bytes once and only once for the redirection reference.

Note that the view from the client can still be non-intuitive in the
face of Composite.  xcompmgr, for example, holds _two_ references to
each window pixmap (one each from CompositeNameWindowPixmap and
RenderCreatePicture), so a synthetic-visual window will have its bytes
split 2/3 to xcompmgr and 1/3 to the server-client.  Nothing to be done
about that, and at least this way we're not over-accounting.

Acked-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-06-21 11:11:49 -04:00
..
compalloc.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
compext.c res: Fix accounting of redirected window pixmaps for Composite 2016-06-21 11:11:49 -04:00
compinit.c composite: Factor out backing store transition 2015-09-24 13:01:51 -04:00
compint.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
compositeext.h composite: Add exception mechanism for implicit redirection policy 2014-04-01 10:31:09 -07:00
compoverlay.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
compwindow.c dix: Restore PaintWindow screen hook 2015-07-08 16:41:28 -04:00
Makefile.am Export CompositeRegisterAlternateVisuals. 2009-04-27 13:29:40 -07:00