Hi Johannes, On Tue, Mar 11, 2008 at 07:27:01PM +0100, Johannes Hofmann wrote:
Hi,
below is another patch to reduce the redraws caused by resizing tables. A new method Layout::queueDrawExcept(), that requests the drawing of a rectangle except another rectangle is added. It is then used in widget.cc to redraw the area that was previously occupied by a widget, but is no longer occupied after a resize or move. This makes it possible to redraw less when a table resizes. All in all it should reduce the flicker a bit when loading table based pages.
On the topic of reducing the flicker, I'm far of an expert and please correct me if I'm wrong. AFAIU, the current design draws the background color before the widget content. This is: if you have an html page as big table, in dillo, it will become a table inside a textblock. When the textblock is asked to redraw, it will _erase_ the table with its background color and ask its child (the table) to redraw. Causing flicker. If this is true, a big gain could come from a different approach: just draw the surroundings of the widgets and ask the child widgets to redraw. This way widgets aren't erased beforehand, and can also decide not to redraw themselves when nothing has changed. I have worked a bit on this idea, and the attached patch mocks the idea hackishly. It draws the "padding" area of the CSS box (see the picture in namespacedw_1_1core_1_1style.html in dw docs) Please give it a review and share your comments, corrections and thoughts. -- Cheers Jorge.-