[Webkit-unassigned] [Bug 71368] New: Switch SVGImage cache to store ImageBuffers instead of whole SVGImages, including a DOM/Render tree
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 2 08:58:51 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=71368
Summary: Switch SVGImage cache to store ImageBuffers instead of
whole SVGImages, including a DOM/Render tree
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: SVG
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: zimmermann at kde.org
CC: koivisto at iki.fi, zimmermann at kde.org
Blocks: 71226,71253
The current approach of having N-SVGImages, including N views/dom/render trees is tricky, as we have multiple SVGImageChromeClients whose invalidateContentsAndWindow() calls all inform the same ImageObserver, the CachedImage. Any change of any of the documents in the SVGImage cache cause imageChanged() calls in RenderImage, leading to races.
Another side-effect of using multiple SVGImages, is that animations restart each time the document is zoomed.
This is very likely to cause of the regressions, see bug 71226 & 71253, that bug 47156 caused.
I've now switched this again to use a single SVGImage, but cache ImageBuffers at different sizes and create Images from them, if needed.
If a resource is now shared by eg. two consumers (say <html:img> and background-image of a <div>), and if it contains animations following happens now: the FrameView::layout() thats triggered from the embedded documents layout timer, marks the ImageBuffer in the CachedImage dirty and RenderImage::imageChanged() / RenderBox::imageChanged() both trigger repaints of themselves in the host document). Once the host document repaints, the ImageBuffers are cleared and repainted using SVGImage::drawSVGToImageBuffer(), which takes a snapshot of the current frame. This doesn't cause any recreation of ImageBuffers and/or SVGImages anymore.
This will also cleanup the code a lot. Patch will come soon.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list