Re: Virtualizing paint functions



Owen Taylor <otaylor redhat com> writes:

> So:
> 
>  if (GDK_IS_PAINTABLE(window)->impl)) 
>    {
>      GDK_PAINTABLE(impl)->invalidate_region(region);
>      return;
>    }
> 
>  [ Current implementation ]
> 
> That *is* another way of doing backend customization from what we have
> as well, but at least it's a way that fits into the general GObject
> patterns. 

An idea I had a while was to make begin/end paint methods on the impl
drawable that would return a drawable:

        Drawable *begin_paint (Drawable *, Region *)
        Drawable *end_paint (Drawable *)

After a call to begin_paint() the frontend of gdk would then redirect
all drawing to the returned drawable. OS X could implement
begin_paint() by returning the same drawable with painting turned
off. The X backend could return a pixmap. end_paint() would return the
original drawable.

A nice thing about this scheme is that it allows all the antiexpose
handling to be confined to the X backend.



Soren



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]