[patch] partial redraws - updated
Hello, this patch fixes the problem pointed out by Sebastian regarding partial redraws and scrolling interference. It adds a new Region class that is implemented similarily as in dillo1 as a set of rectangles not containing each other. The conversion from canvas to view coordinates is now done at draw-time. Regards, Johannes PS: The code did not get as complex as I initially thought it would :-)
On Sun, Dec 02, 2007 at 01:53:14PM +0100, Johannes Hofmann wrote:
Hello,
this patch fixes the problem pointed out by Sebastian regarding partial redraws and scrolling interference. It adds a new Region class that is implemented similarily as in dillo1 as a set of rectangles not containing each other. The conversion from canvas to view coordinates is now done at draw-time.
Committed!
PS: The code did not get as complex as I initially thought it would :-)
Great. -- Cheers Jorge.-
On Mon, Dec 03, 2007 at 02:00:07PM -0300, Jorge Arellano Cid wrote:
On Sun, Dec 02, 2007 at 01:53:14PM +0100, Johannes Hofmann wrote:
Hello,
this patch fixes the problem pointed out by Sebastian regarding partial redraws and scrolling interference. It adds a new Region class that is implemented similarily as in dillo1 as a set of rectangles not containing each other. The conversion from canvas to view coordinates is now done at draw-time.
Committed!
Thanks. Attached is another patch that has some improvements to that code: * The case that multiple rectangles can be exactly combined to a larger one is quite likely (other than the comment in dillo1 suggests). It happens all the time, e.g. when an image is loaded piece by piece. The region code is improved to take advantage of this. * A minor bug also present in the dillo1 code is fixed: If a rectangle existing already in the region is contained in a newly added rectangle, we must not stop the loop. The new rectangle may contain other rectangles as well! * The actual drawing of a region now checks, whether a rectangle is actually visible at the moment. * The background is now cleared properly when doing a partial redraw. This fixes some screen corruption occuring when selecting / deselecting text. Cheers, Johannes
PS: The code did not get as complex as I initially thought it would :-)
Great.
-- Cheers Jorge.-
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
Hi Johannes, On Tue, Dec 04, 2007 at 11:03:01AM +0100, Johannes Hofmann wrote:
On Mon, Dec 03, 2007 at 02:00:07PM -0300, Jorge Arellano Cid wrote:
On Sun, Dec 02, 2007 at 01:53:14PM +0100, Johannes Hofmann wrote:
Hello,
this patch fixes the problem pointed out by Sebastian regarding partial redraws and scrolling interference. It adds a new Region class that is implemented similarily as in dillo1 as a set of rectangles not containing each other. The conversion from canvas to view coordinates is now done at draw-time.
Committed!
Thanks. Attached is another patch that has some improvements to that code:
Excellent. Committed.
* The case that multiple rectangles can be exactly combined to a larger one is quite likely (other than the comment in dillo1 suggests). It happens all the time, e.g. when an image is loaded piece by piece. The region code is improved to take advantage of this.
ok.
* A minor bug also present in the dillo1 code is fixed: If a rectangle existing already in the region is contained in a newly added rectangle, we must not stop the loop. The new rectangle may contain other rectangles as well!
ok.
* The actual drawing of a region now checks, whether a rectangle is actually visible at the moment.
Does this help to reduce flickering?
* The background is now cleared properly when doing a partial redraw. This fixes some screen corruption occuring when selecting / deselecting text.
ok. Please excuse me for not having yet the time to review the patch for the scrolling bars. Has Sebastian commented it to you? If not, even when I'm not an expert in dw2, I'd prefer to push forward development in that area and to commit what looks OK. Sebastian will always have the opportunity to comment/fix later. As a matter of fact I'm working of improving table rendering now, and I already have some code that works. It's a complex area that needs some work but I hope to commit a patch this week. BTW, did you receive comments on the patch that lowered CPU consumption when gliding the mouse over pages full of links? -- Cheers Jorge.-
Hi Jorge, On Tue, Dec 04, 2007 at 10:05:25AM -0300, Jorge Arellano Cid wrote:
Hi Johannes,
On Tue, Dec 04, 2007 at 11:03:01AM +0100, Johannes Hofmann wrote:
On Mon, Dec 03, 2007 at 02:00:07PM -0300, Jorge Arellano Cid wrote:
On Sun, Dec 02, 2007 at 01:53:14PM +0100, Johannes Hofmann wrote:
Hello,
this patch fixes the problem pointed out by Sebastian regarding partial redraws and scrolling interference. It adds a new Region class that is implemented similarily as in dillo1 as a set of rectangles not containing each other. The conversion from canvas to view coordinates is now done at draw-time.
Committed!
Thanks. Attached is another patch that has some improvements to that code:
Excellent.
Committed.
until now, just the Changlog has been commited, right?
* The case that multiple rectangles can be exactly combined to a larger one is quite likely (other than the comment in dillo1 suggests). It happens all the time, e.g. when an image is loaded piece by piece. The region code is improved to take advantage of this.
ok.
* A minor bug also present in the dillo1 code is fixed: If a rectangle existing already in the region is contained in a newly added rectangle, we must not stop the loop. The new rectangle may contain other rectangles as well!
ok.
* The actual drawing of a region now checks, whether a rectangle is actually visible at the moment.
Does this help to reduce flickering?
I don't think so, it just shortcuts drawing operations that are not visible anyway.
* The background is now cleared properly when doing a partial redraw. This fixes some screen corruption occuring when selecting / deselecting text.
ok.
Please excuse me for not having yet the time to review the patch for the scrolling bars. Has Sebastian commented it to you?
No, not yet.
If not, even when I'm not an expert in dw2, I'd prefer to push forward development in that area and to commit what looks OK. Sebastian will always have the opportunity to comment/fix later.
Regarding the scrollbars there is something fishy in the current code that needs fixing: The scrollbars are created in the FltkViewport constructor and they are drawn on the screen area belonging to FltkViewport. However from fltk point of view they are children of TopGroup. I think this is the reason why fltk replace() does not work properly. However, my proposed fix is really quite radical and I would want to wait for a comment from Sebastian before we head into that direction.
As a matter of fact I'm working of improving table rendering now, and I already have some code that works. It's a complex area that needs some work but I hope to commit a patch this week.
BTW, did you receive comments on the patch that lowered CPU consumption when gliding the mouse over pages full of links?
No, but the change is not that dramatic, so I think it can be applied. Do you need a patch against current cvs? Cheers, Johannes
-- Cheers Jorge.-
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
Hi, On Tue, Dec 04, 2007 at 02:42:32PM +0100, Johannes Hofmann wrote:
Hi Jorge,
Committed!
Thanks. Attached is another patch that has some improvements to that code:
Excellent.
Committed.
until now, just the Changlog has been commited, right?
Right, my mistake. :-P Committed again.
If not, even when I'm not an expert in dw2, I'd prefer to push forward development in that area and to commit what looks OK. Sebastian will always have the opportunity to comment/fix later.
Regarding the scrollbars there is something fishy in the current code that needs fixing: The scrollbars are created in the FltkViewport constructor and they are drawn on the screen area belonging to FltkViewport. However from fltk point of view they are children of TopGroup.
Yes, we know there's something fishy there because while in Germany we discovered scrollbars worked without the line that was supposedly drawing them! :-)
I think this is the reason why fltk replace() does not work properly.
However, my proposed fix is really quite radical and I would want to wait for a comment from Sebastian before we head into that direction.
OK.
As a matter of fact I'm working of improving table rendering now, and I already have some code that works. It's a complex area that needs some work but I hope to commit a patch this week.
BTW, did you receive comments on the patch that lowered CPU consumption when gliding the mouse over pages full of links?
No, but the change is not that dramatic, so I think it can be applied. Do you need a patch against current cvs?
Committed. -- Cheers Jorge.-
participants (2)
-
jcid@dillo.org
-
Johannes.Hofmann@gmx.de