API for per-object per-screen privates

Jamey Sharp jamey at minilop.net
Fri Sep 17 02:48:31 PDT 2010


In the privates rework for 1.9, Keith introduced dixCreatePrivateKey to
support dynamically-allocated private keys. He used this to replace one
MAXSCREENS-sized array of per-screen private keys.

We think the right pattern here is an API dedicated to per-screen
per-object privates, so these patches replace dixCreatePrivateKey with
dixRegisterScreenPrivateKey and other per-screen analogues of the
privates API. We think this API is more clear, and supports more
interesting implementations later.

The first patch is pretty optional but it's what we based the others on.
The third patch demonstrates that this new API is sufficiently general,
eliminating another MAXSCREENS-sized array.

We're planning to build more stuff on this API soon, so review welcome.

- Jamey Sharp and Josh Triplett


More information about the xorg-devel mailing list