Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Jean Brefort
Le samedi 21 juin 2014 à 11:28 -0400, Jasper St. Pierre a écrit : > On Sat, Jun 21, 2014 at 10:26 AM, Jasper St. Pierre > wrote: > Honest question: which ones? The only requirement we have with > Wayland is that we know when a paint has begun and when it has > ended, and al

Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Jasper St. Pierre
On Sat, Jun 21, 2014 at 11:42 AM, Paul Davis wrote: > > the expose region or the expose "area" ? the former is a potentially > discontiguous set of rectangles, the latter is their union. yes? > > The expose region. See gtk_widget_send_expose: https://git.gnome.org/browse/gtk+/tree/gtk/gtkwidget.c

Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Paul Davis
On Sat, Jun 21, 2014 at 11:21 AM, Jasper St. Pierre wrote: > On Sat, Jun 21, 2014 at 11:18 AM, Jean Brefort < > jean.bref...@normalesup.org> wrote: > >> I know that an expose event contains a region, but this does not help, >> we use the draw event, and I don't know how to reliably access the >>

Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Jasper St. Pierre
On Sat, Jun 21, 2014 at 10:26 AM, Jasper St. Pierre wrote: > Honest question: which ones? The only requirement we have with Wayland is > that we know when a paint has begun and when it has ended, and also the > rough area of paint, so we can tell the Wayland compositor when to swap > buffers, and

Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Jasper St. Pierre
On Sat, Jun 21, 2014 at 11:18 AM, Jean Brefort wrote: > I know that an expose event contains a region, but this does not help, > we use the draw event, and I don't know how to reliably access the > region. More, it is not really easy to determine what needs to be > redrawn from inside a draw even

Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Jean Brefort
Le samedi 21 juin 2014 à 11:05 -0400, Paul Davis a écrit : > > > > On Sat, Jun 21, 2014 at 10:35 AM, Jean Brefort > wrote: > In gnumeric this arised when we draw an animated rectangle > around the > selected rectangle. When using the draw event, we need to > repa

Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Paul Davis
On Sat, Jun 21, 2014 at 10:35 AM, Jean Brefort wrote: > In gnumeric this arised when we draw an animated rectangle around the > selected rectangle. When using the draw event, we need to repaint > everything inside the rectangle and this made gnumeric quite > unresponsive when there were many cell

Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Jean Brefort
Le samedi 21 juin 2014 à 10:05 -0400, Paul Davis a écrit : > > > > On Sat, Jun 21, 2014 at 10:02 AM, Jean Brefort > wrote: > > > you're drawing on the window outside of an expose/draw > event?> > > > Yes, because using draw events presents seri

Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Jasper St. Pierre
Honest question: which ones? The only requirement we have with Wayland is that we know when a paint has begun and when it has ended, and also the rough area of paint, so we can tell the Wayland compositor when to swap buffers, and from which rectangles. The draw signal does this automatically, but

Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Paul Davis
On Sat, Jun 21, 2014 at 10:02 AM, Jean Brefort wrote: > > > you're drawing on the window outside of an expose/draw event?> > > Yes, because using draw events presents serious performance issues. > can you describe these or point to a description of them? there are several "native" window(ing) sy

Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Jean Brefort
Le samedi 21 juin 2014 à 09:55 -0400, Paul Davis a écrit : > > > > On Sat, Jun 21, 2014 at 9:44 AM, Jean Brefort > wrote: > Both abiword and gnumeric do something like: > > cr = gdk_cairo_create(win); > ...do some drawing > then relase the cairo. >

Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Colomban Wendling
Le 21/06/2014 03:00, Jasper St. Pierre a écrit : > To better support Wayland with fewer copies and less drawing artifacts, > I've pushed some potentially breaking changes to GDK, namely around > gdk_cairo_create and gdk_window_begin_paint_region. > > https://git.gnome.org/browse/gtk+/commit/?id=d4

Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Jean Brefort
Sure that it would help us if the the background was not cleared (I now remember that we avoided using them because of this feature). Thanks, Jean Le samedi 21 juin 2014 à 09:56 -0400, Jasper St. Pierre a écrit : > Yes, that should work. Make sure to test it, though, as > begin_paint_rect / begin

Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Jasper St. Pierre
Yes, that should work. Make sure to test it, though, as begin_paint_rect / begin_paint_region currently clears the specified rect/region to the background set on the GdkWindow. If passing a more exact region is too much of an annoyance, I should be able to also change this without breaking too much

Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Paul Davis
On Sat, Jun 21, 2014 at 9:44 AM, Jean Brefort wrote: > Both abiword and gnumeric do something like: > > cr = gdk_cairo_create(win); > ...do some drawing > then relase the cairo. > > Will this still work if we use > > gdk_window_begin_paint_rect (win, rect); > cr = gdk_cairo_create (win); > ...do

Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Jean Brefort
Both abiword and gnumeric do something like: cr = gdk_cairo_create(win); ...do some drawing then relase the cairo. Will this still work if we use gdk_window_begin_paint_rect (win, rect); cr = gdk_cairo_create (win); ...do some drawing gdk_window_end_paint (win); ? Le samedi 21 juin 2014 à 09

Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Jasper St. Pierre
Can you two explain exactly what Abiword and Gnumeric are doing, what APIs they're using and why and so on? We're trying to come up with a solution that will work well under both X11 and Wayland. As I said, if it's a really bad break and would require intensive changes to apps, I'll revert the pat

Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Jean Brefort
This will break abiword as well. Jean Le samedi 21 juin 2014 à 08:02 -0400, Morten Welinder a écrit : > Argh! > > Will the stream of ABI changes never end? > > Gnumeric uses this to provide a walking-ant cursor large selected areas -- > areas > too big for processing in the normal paint loop.

Re: Heads-up: Potentially breaking changes to the GDK drawing model pushed

2014-06-21 Thread Morten Welinder
Argh! Will the stream of ABI changes never end? Gnumeric uses this to provide a walking-ant cursor large selected areas -- areas too big for processing in the normal paint loop. Morten On Fri, Jun 20, 2014 at 9:00 PM, Jasper St. Pierre wrote: > To better support Wayland with fewer copies a