[PATCH xserver] dix: Move {Change, Copy, Destroy}Clip from GCFuncs to Screen

Keith Packard keithp at keithp.com
Wed Mar 1 08:07:49 UTC 2017


Eric Anholt <eric at anholt.net> writes:

> I tried to come up with a reason I would want a layer to be able to
> change the funcs per-gc at runtime, and failed.  Yay for killing
> boilerplate.

So, if we're changing wrappers, anyone want to consider a more
outlandish plan, like replacing the current ad-hoc plan of stashing the
current value away in a screen private and writing your own version?

There are a bunch of places which end up with wrappers for things like
CloseScreen, which should pretty obviously just be a notification chain
for various server events; that would remove a bunch of icky wrapper
code.

For the real wrappers, I think we can start with some requirements:

 1) Remove wrappers at any time.

 2) Insert at the 'right place' in the chain, independent of where the
    wrapping happens.

 3) "impossible" to get wrong, so no cult-n-paste code
    needed for every step of wrapping

I wonder if we could specify a total order of wrappers in the server and
then make that part of the ABI? In the current server, for drawing, I
think we've got something like?

        damage
        accel (exa/glamor)
        fb
        mi

(is that it?)

Off the top of my head, imagine each proc in the screen being a
list. The list elements would have the func to call and the
order. It could be an array instead; that'd save a pile of space but
make insert/delete expensive.

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20170301/3f82469d/attachment-0001.sig>


More information about the xorg-devel mailing list