diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-06-20 16:45:38 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-06-21 04:09:16 +0200 |
commit | e6f2f6427122dc4bc802acebf26f8cec16cd2f62 (patch) | |
tree | a54769dcaa9dd5e328991bb4a98042bcc107da28 /nx-X11/programs | |
parent | 27459865199b887cae2e892fec2935cd2b0dec52 (diff) | |
download | nx-libs-e6f2f6427122dc4bc802acebf26f8cec16cd2f62.tar.gz nx-libs-e6f2f6427122dc4bc802acebf26f8cec16cd2f62.tar.bz2 nx-libs-e6f2f6427122dc4bc802acebf26f8cec16cd2f62.zip |
dix: remove caching of drawables and graphics contexts. The security checks simply bypass the cached values so they are unused.
Backported from X.org:
commit 9a183d7ba50e31afa133cc03aee7991517a283ea
Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
Date: Tue Aug 14 11:39:26 2007 -0400
dix: remove caching of drawables and graphics contexts. The security checks
simply bypass the cached values so they are unused.
Backport to nx-libs: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'nx-X11/programs')
-rw-r--r-- | nx-X11/programs/Xserver/dix/resource.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/nx-X11/programs/Xserver/dix/resource.c b/nx-X11/programs/Xserver/dix/resource.c index d579b33fa..dd7e88596 100644 --- a/nx-X11/programs/Xserver/dix/resource.c +++ b/nx-X11/programs/Xserver/dix/resource.c @@ -530,8 +530,6 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType) RESTYPE rtype = res->type; *prev = res->next; elements = --*eltptr; - if (rtype & RC_CACHED) - FlushClientCaches(res->id); if (rtype != skipDeleteFuncType) (*DeleteFuncs[rtype & TypeMask])(res->value, res->id); xfree(res); @@ -542,11 +540,6 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType) else prev = &res->next; } - if(clients[cid] && (id == clients[cid]->lastDrawableID)) - { - clients[cid]->lastDrawable = (DrawablePtr)screenInfo.screens[0]->root; - clients[cid]->lastDrawableID = screenInfo.screens[0]->root->drawable.id; - } } if (!gotOne) ErrorF("Freeing resource id=%lX which isn't there.\n", @@ -570,8 +563,6 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree) if (res->id == id && res->type == type) { *prev = res->next; - if (type & RC_CACHED) - FlushClientCaches(res->id); if (!skipFree) (*DeleteFuncs[type & TypeMask])(res->value, res->id); xfree(res); @@ -580,11 +571,6 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree) else prev = &res->next; } - if(clients[cid] && (id == clients[cid]->lastDrawableID)) - { - clients[cid]->lastDrawable = (DrawablePtr)screenInfo.screens[0]->root; - clients[cid]->lastDrawableID = screenInfo.screens[0]->root->drawable.id; - } } } @@ -607,8 +593,6 @@ ChangeResourceValue (XID id, RESTYPE rtype, void * value) for (; res; res = res->next) if ((res->id == id) && (res->type == rtype)) { - if (rtype & RC_CACHED) - FlushClientCaches(res->id); res->value = value; return TRUE; } @@ -732,8 +716,6 @@ FreeClientNeverRetainResources(ClientPtr client) if (rtype & RC_NEVERRETAIN) { *prev = this->next; - if (rtype & RC_CACHED) - FlushClientCaches(this->id); (*DeleteFuncs[rtype & TypeMask])(this->value, this->id); xfree(this); } @@ -778,8 +760,6 @@ FreeClientResources(ClientPtr client) { RESTYPE rtype = this->type; *head = this->next; - if (rtype & RC_CACHED) - FlushClientCaches(this->id); (*DeleteFuncs[rtype & TypeMask])(this->value, this->id); xfree(this); } |