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