[GSoC] Integrate LO with GNOME - WR#7
Pranav Kant
pranav913 at gmail.com
Sun Jul 19 10:10:45 PDT 2015
On Sun, Jul 19, 2015 at 12:42 AM, Michael Meeks
<michael.meeks at collabora.com> wrote:
> Hi Pranav,
>
> On Fri, 2015-07-17 at 23:50 +0530, Pranav Kant wrote:
>> I followed the approach you mentioned.
>
> Heh =)
>
>> 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.
>
> Hmm ? why do we replace those tiles before we have new copies of them
> to replace them with ?
I was doing the same, that is, not replacing until I have new copies,
but there was a minor glitch in my code. Now it works fine ! :)
>
>> The callback gets called when the actual tile gets rendered, and
>> it replaces the dummy tile with it.
>
> Sorry in a car currently, so can't see your movie ;-) here is the
> sequence I expect.
>
>
> LOK Thread GTK Thread
>
> Invalidate Area ->
> handle_invalidate
> async. request new tiles for this area
> Render new tiles
> ...
> return tile 1 ->
> ... update underlying tile in cache
> queue gtk re-draw with
> gtk_widget_queue_draw_area
> ... gtk idle loop ...
> ... widget draw(cairo_t cr) ...
> render_to(cr)
> return tile 2 ->
>
> etc. so the invalidation of tiles from the LOK thread
> itself only queues async. re-rendering of the gtk+ tiles by the LOK
> backend. There is no point at all in discarding and re-rendering
> anything in the gtk+ thread while that goes on.
>
> Does that make sense ? there is simply no sensible[1] way to get a
> valid cairo_t outside the gdk/gtk callback to the 'draw' method - I
> would abandon all hope of that =)
>
> ATB,
>
> Michael.
>
> [1] - it is of course possible, but such a bad idea that ... ;-)
> --
> michael.meeks at collabora.com <><, Pseudo Engineer, itinerant idiot
>
--
Regards,
Pranav Kant
http://pranavk.me
More information about the LibreOffice
mailing list