Re: Problems with expose_event->region patch



On 12 Mar 2001, Sven Neumann wrote:

> Hi,
>
> Alexander Larsson <alla lysator liu se> writes:
>
> > On 7 Mar 2001, Owen Taylor wrote:
> >
> > > At least with backing store, I don't follow this. Only the region
> > > is copied from the back buffer to the screen, so painting outside
> > > the region doesn't matter. There is an implicit clip to the region
> > > passed to gtk_window_begin_paint().
> > >
> > > (Have you changed gtk_main_do_event to call gtk_window_begin_paint_region?
> > > Now that you have the region in the expose?)
> >
> > No, i must have missed this. I'm not very good at the backing store stuff,
> > and i don't think many are. Have you written any docs on that?
> >
> > When i made this change everything works just perfect.
>
> Well, as expected it seems to work just fine for the backing-store-case
> but breaks redrawing if backing store is not available (or implemented
> differently).

Yes. Not implementing backing store changes semantics a bit though, so it
was probably slightly broken before too. But this is owens area, he'll
know better.

> > > For the non-backing-store case we could even add a
> > > gdk_drawable_set_clip_region() call and emulate it by changing the
> > > GC's clips, though that could be rather inefficient without a
> > > lot of complexity.
>
> I'm now trying to fix redrawing in the DirectFB port (which does a
> much simplified version of backing store in the hardware, not using
> pixmaps). Just to assure that I got the principle correct:
>
> The region as passed to gdk_window_begin_paint_region() is supposed to
> be a list of rectangles all following clearing and drawing operations
> have to be clipped to until gdk_window_end_paint() is called? If this
> is assured all clearing and redrawing should work correctly. Is this
> correct?

Yes, and if several gdk_window_begin_paint_xxx() are called they are
correctly stacked.

/ Alex






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