diff options
author | marha <marha@users.sourceforge.net> | 2012-04-20 17:07:15 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-04-20 17:07:15 +0200 |
commit | 0e3699334faf92f508b6c187a261548b656b0dd3 (patch) | |
tree | 28d7e84df7b54a3e6f85bf83e38efba937288fd3 /xorg-server/composite | |
parent | c1194ccd395fdbb23c9ab56bc340ee20a5feeb82 (diff) | |
download | vcxsrv-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')
-rw-r--r-- | xorg-server/composite/compext.c | 25 | ||||
-rw-r--r-- | xorg-server/composite/compint.h | 2 | ||||
-rw-r--r-- | xorg-server/composite/compositeext.h | 2 |
3 files changed, 28 insertions, 1 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) diff --git a/xorg-server/composite/compint.h b/xorg-server/composite/compint.h index 6c4272e5b..9e2713e93 100644 --- a/xorg-server/composite/compint.h +++ b/xorg-server/composite/compint.h @@ -71,6 +71,7 @@ #include "damageextint.h" #include "xfixes.h" #include <X11/extensions/compositeproto.h> +#include "compositeext.h" #include <assert.h> /* @@ -182,7 +183,6 @@ extern DevPrivateKeyRec CompSubwindowsPrivateKeyRec; #define GetCompSubwindows(w) ((CompSubwindowsPtr) \ dixLookupPrivate(&(w)->devPrivates, CompSubwindowsPrivateKey)) -extern RESTYPE CompositeClientWindowType; extern RESTYPE CompositeClientSubwindowsType; extern RESTYPE CompositeClientOverlayType; diff --git a/xorg-server/composite/compositeext.h b/xorg-server/composite/compositeext.h index 600604d8d..0b148f029 100644 --- a/xorg-server/composite/compositeext.h +++ b/xorg-server/composite/compositeext.h @@ -35,4 +35,6 @@ extern _X_EXPORT Bool CompositeRegisterAlternateVisuals(ScreenPtr pScreen, VisualID * vids, int nVisuals); +extern _X_EXPORT RESTYPE CompositeClientWindowType; + #endif /* _COMPOSITEEXT_H_ */ |