Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


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 <pranav913@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.meeks@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.meeks@collabora.com  <><, Pseudo Engineer, itinerant idiot




--
Regards,
Pranav Kant
http://pranavk.me



-- 
Regards,
Pranav Kant
http://pranavk.me

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.