I know you guys are not in charge of this stuff, but you probably know the answer. Can you verify or debunk the following text?:
I bet browsers implement svg as a series of rendering instructions stored on the video adapter, under the covers. Graphics APIs provide ways of doing this. OpenGL calls it a display list. Skia calls it an SkPicture. When asked to render, if nothing has changed, the browser can just call a command that says “draw display list 52 using this [matrix]”. Instead of parsing the svg data every time it generates a render for a canvas or div. Then the browser probably listens for when the svg data is altered. If that happens, then it re-parses the svg data and re-creates the display list. I bet they even keep those display lists around, if the svg is destroyed. In case it comes back a few seconds later because the user scrolled back. Then they could just say “oh I have that right here. Display list 52.” If the svg is not loaded in a certain amount of time, or if they are running low on memory, they might flush out those unused display lists they were caching.
I know you guys are not in charge of this stuff, but you probably know the answer. Can you verify or debunk the following text?:
I bet browsers implement svg as a series of rendering instructions stored on the video adapter, under the covers. Graphics APIs provide ways of doing this. OpenGL calls it a display list. Skia calls it an SkPicture. When asked to render, if nothing has changed, the browser can just call a command that says “draw display list 52 using this [matrix]”. Instead of parsing the svg data every time it generates a render for a canvas or div. Then the browser probably listens for when the svg data is altered. If that happens, then it re-parses the svg data and re-creates the display list. I bet they even keep those display lists around, if the svg is destroyed. In case it comes back a few seconds later because the user scrolled back. Then they could just say “oh I have that right here. Display list 52.” If the svg is not loaded in a certain amount of time, or if they are running low on memory, they might flush out those unused display lists they were caching.
--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.
Thanks for the link. Very interesting. What do you think about the caching of things discarded, in case they come back?
Each stage is caching data derived from previous stages, and gets (minimally) invalidated when upstream content changes. The display list mechanism you are referencing comes into play when passing draw commands from Blink's layout tree to the Chrome Compositor (CC). As Hal mentioned, it's a private in-RAM representation and not something we pass further down to the GPU -- instead, these display lists (paint_op_buffers in the current "Slimming Paint" incarnation -- see [1]) are converted to Skia draw commands on the fly, when they need to be rasterized.HTML/CSS/resources -> DOM tree -> layout tree -> display lists + property trees -> [Skia] -> rasterized tiles