Maybe I should consider updating the overlay only after I get the actual tile ?
On Fri, Jul 17, 2015 at 11:50 PM, Pranav Kant <pranav...@gmail.com> wrote: > I followed the approach you mentioned. > > But the user experience is poor this way. As I am typing things on the > keyboard the immediate effect is that it places dummy tiles for > fraction of seconds in place of invalidated tiles. The callback gets > called when the actual tile gets rendered, and it replaces the dummy > tile with it. > > It was much better initially. > > Here[1] is the screencast of what I exactly want to say. > > [1] https://pranvk.fedorapeople.org/async.webm > > On Thu, Jul 16, 2015 at 1:18 AM, Michael Meeks > <michael.me...@collabora.com> wrote: >> Hi Pranav, >> >> On Wed, 2015-07-15 at 23:48 +0530, Pranav Kant wrote: >>> One important function that I am still not able to call in separate >>> thread is drawing the tiles on the screen. The gtk passes the cairo >>> contexts whenever 'draw' signal is emitted. The drawing works fine if >>> I use this cairo contexts in a synchronous way, >> >> Ho hum =) this is not possible. The Cairo context is (by design) only >> live for the scope of the 'draw' signal - this is a feature heavily tied >> to double buffering, and the gtk+ rendering infrastructure and it is a >> 'good thing' (TM) =) >> >> I would recommend instead rendering the tile content asynchronously, >> and if we have no tile rendering something else ;-) ( a scaled version >> of what was there, or a white background). >> >> LibreOffice can render its tiles asynchronously rather nicely - and >> when they show up - just call the gtk+ equivalent of invalidate: >> gtk_widget_queue_draw_area() and in a few microseconds you should get >> the callback with the cairo context that you want =) >> >> Hope that helps ! =) >> >> ATB, >> >> Michael. >> >> -- >> michael.me...@collabora.com <><, Pseudo Engineer, itinerant idiot >> > > > > -- > Regards, > Pranav Kant > http://pranavk.me -- Regards, Pranav Kant http://pranavk.me _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice