Eric Anholt <[email protected]> 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

Attachment: signature.asc
Description: PGP signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to