W dniu 21 marca 2010 12:25 użytkownik Vangelis Katsikaros <vkatsikaros@...1244...> napisał:
When you say canvas you mean the whole svg area (parts that are inside and outside the user's viewport) or only what is visible in the user's viewport?
Tiling is generally on canvas, not on the viewport; otherwise you would have to redraw on scrolling.
I see two different issues: a) rendering shapes that intersect with the user's viewport. This is needed when the user moves the viewport or changes zoom level.
The old renderer already does this, by checking the bounding box of the item against the tile. It's in sp-canvas.cpp:874.
b) from the shapes, that intersect with the user's viewport, rendering only the ones that have been updated. This is needed when the user keeps the viewport still but makes edits on the shapes.
I think this won't make a big difference. Drawing solid non-transparent shapes is very fast, and it's the only case where you can apply this optimization. In other cases you have to redraw unchanged shapes as well. For example when you edit a semi-transparent path that's above another path, you have to draw them both - unless you have a pre-rendered image of the underlying path saved somewhere.
Regards, Krzysztof