gtk_widget_queue_draw_area much slower in gtk3 than gtk3



Hi there,

I am one of the developers of xournal. We have been trying very hard
to port from gtk2 to gtk3 (specially since gnomecanvas was abandoned).
I recently joined xournalpp which is a new rewrite of xournal, and it
is in the same boat:
trying to go from gtk2 to gtk3.

So far the functionality is there, but we have been hit by a major
problem in both apps: gtk3 is much slower rendering to the canvas than
gtk2.

I have tried to track this problem down, and my experiments suggest
that it is the call to

gtk_widget_queue_draw_area

We draw a segment of a line  using cairo, but it does not get drawn
to the screen until gtk_widget_queue_draw_area is called. Which is
fine. But under gtk3
it really slows down sampling of the stylus.

Imagine drawing a circle with a stylus on the screen (or a mouse). Under gtk2
circles are nice and smooth. Under gtk3 they are harsh polygons. I have removed
the call to gtk_widget_queue_draw under gtk3, and then circles are
smooth (of course
they are only redrawn when I force a refresh by changing workspaces
under linux).

is there any suggestion on why is this happening, specially when it
was working properly  under gtk2?

alternatively, is there another way to force that drawings done with
cairo be drawn on the screen without using gtk_widget_queue_draw?


thank you!

-- 
--dmg

---
Daniel M. German
http://turingmachine.org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]