aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/composite/compext.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-20 17:07:15 +0200
committermarha <marha@users.sourceforge.net>2012-04-20 17:07:15 +0200
commit0e3699334faf92f508b6c187a261548b656b0dd3 (patch)
tree28d7e84df7b54a3e6f85bf83e38efba937288fd3 /xorg-server/composite/compext.c
parentc1194ccd395fdbb23c9ab56bc340ee20a5feeb82 (diff)
downloadvcxsrv-0e3699334faf92f508b6c187a261548b656b0dd3.tar.gz
vcxsrv-0e3699334faf92f508b6c187a261548b656b0dd3.tar.bz2
vcxsrv-0e3699334faf92f508b6c187a261548b656b0dd3.zip
fontconfig libX11 mesa pixman xserver git update 20 april 2012
Diffstat (limited to 'xorg-server/composite/compext.c')
-rw-r--r--xorg-server/composite/compext.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/xorg-server/composite/compext.c b/xorg-server/composite/compext.c
index 940eed1fc..1d4d8bf97 100644
--- a/xorg-server/composite/compext.c
+++ b/xorg-server/composite/compext.c
@@ -497,6 +497,28 @@ SProcCompositeDispatch(ClientPtr client)
return BadRequest;
}
+/** @see GetDefaultBytes */
+static void
+GetCompositeClientWindowBytes(pointer value, XID id, ResourceSizePtr size)
+{
+ WindowPtr window = value;
+
+ /* Currently only pixmap bytes are reported to clients. */
+ size->resourceSize = 0;
+
+ /* Calculate pixmap reference sizes. */
+ size->pixmapRefSize = 0;
+ if (window->redirectDraw != RedirectDrawNone)
+ {
+ SizeType pixmapSizeFunc = GetResourceTypeSizeFunc(RT_PIXMAP);
+ ResourceSizeRec pixmapSize = { 0, 0 };
+ ScreenPtr screen = window->drawable.pScreen;
+ PixmapPtr pixmap = screen->GetWindowPixmap(window);
+ pixmapSizeFunc(pixmap, pixmap->drawable.id, &pixmapSize);
+ size->pixmapRefSize += pixmapSize.pixmapRefSize;
+ }
+}
+
void
CompositeExtensionInit(void)
{
@@ -529,6 +551,9 @@ CompositeExtensionInit(void)
if (!CompositeClientWindowType)
return;
+ SetResourceTypeSizeFunc(CompositeClientWindowType,
+ GetCompositeClientWindowBytes);
+
CompositeClientSubwindowsType = CreateNewResourceType
(FreeCompositeClientSubwindows, "CompositeClientSubwindows");
if (!CompositeClientSubwindowsType)