Re: Cullng drawing depending on visibility events



On Fri, 2003-04-04 at 10:43, Keith Packard wrote:
> Around 10 o'clock on Apr 4, Owen Taylor wrote:
> 
> > This can be omitted:
> >  
> > - If GDK_EXPOSURE_MASK is in the window's event mask, then 
> >   it isn't necessary
> 
> No, this part is necessary -- a visibility event may not be followed by 
> exposure events, or may be followed by exposure events which don't cover 
> the entire visible region.  In either case, the application will need to 
> somehow get the visible portion of the window repainted without knowing 
> what that visible region is.

Is this in the case where the server is keeping backing store
for some portions of the window? 

If a window can be reported as fully obscured but still 
maintained in  backing store, that's sort of a mess ... you 
really want to have  a way of keeping track of the "interest" 
of the server in the contents of the window.

If VisibilityNotify doesn't indicate interest, then the
algorithm has to be somewhat different; you have to keep
maintaining the invalid region while the window is obscured,
and when it becomes unobscured, generate repaints based
on the invalid region.

(You really want to avoid repainting the whole window as
soon as a single pixel becomes visible. If the window contents
changed while it was obscured, this isn't going to be possible,
sadly, but you can at least handle the no-change case 
properly.)

Regards,
                                      Owen





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