On 05.04.2011 18:58, Keith Packard wrote:
On Tue, 05 Apr 2011 18:38:41 +0300, Erkki Seppala<erkki.sepp...@vincit.fi>  
wrote:
On 05.04.2011 17:54, Keith Packard wrote:
Please just fix users of the existing 'Hash' function to call
HashResourceID directly.

Hm, are you sure? It looks like this afterwards:
+Hash(int client, XID id)
Am I looking at the wrong branch? (this is client-tracking-v2)

You are looking at the correct branch. It was the diff replacing all existing calls to Hash with HashResourceID, resulting in some duplicity:

- res = clientTable[cid].resources[Hash(cid, id)];
+ res = clientTable[cid].resources[HashResourceID(id, 
clientTable[cid].hashsize)];

times eight.

I updated the git repository. I have separated the three consecutive steps:

dix: add hashing functions to resource.h for others to use.
- Publishes the HashResourceID function

dix: don't use a local wrapper for calling HashResourceID
- Makes the aforementioned search/replace and removes function Hash
- You can choose to apply this at your discretion :).

dix: HashResourceID always succeeds
- Handles values that are less or more than the previous bounds (numBits < 0 will fail with an assertion).

ht_resourceid_hash now knows that HashResourceID always succeeds, so it doesn't fall back to using the generic hash.
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to