- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Tue, 01 Aug 2017 10:02:13 +0000
- To: public-houdini-archive@w3.org
The CSS Working Group just discussed `Consider making Path2D the only way to render paths with PaintRenderingContext2D.`, and agreed to the following resolutions: * `RESOLVED: No change` <details><summary>The full IRC log of that discussion</summary> <nainar> Topic: Consider making Path2D the only way to render paths with PaintRenderingContext2D.<br> <nainar> Github: https://github.com/w3c/css-houdini-drafts/issues/348<br> <fantasai> iank_: This was brought up by a Mozilla engineer<br> <fantasai> nical: That would be me<br> <fantasai> nical: Idea is that the way we want to evolve our rendering code involves a lot of expensive preparation that goes into making path into something we can render efficiently under GPU<br> <fantasai> nical: If we can do as much caching as possible, the better<br> <fantasai> nical: In light of doing a new API, if we could privilege things that are easier to optimize, like things that are retained, it's better for us<br> <fantasai> nical: If we don't expect to need to invalidate custom paint stuff might not be that much of a problem<br> <fantasai> iank_: Proposal was to drop the lineTo APIs and stuff<br> <fantasai> nical: Force people to use path objects so we can cache them<br> <fantasai> dino: Cant' cache them between calls<br> <fantasai> dino: Not going to keep path object between calls<br> <fantasai> dino: ...<br> <fantasai> dino: When draw comes, have to build the path every frame anyway<br> <fantasai> nical: That wasn't my understanding, thought state was preserved<br> <fantasai> iank_: Can potentially cache things in class, but can't rely on that cache existing<br> <fantasai> iank_: Could do ... and use as a cache key<br> <fantasai> dino: At that point API doesn't matter<br> <fantasai> dino: You would have an implementation cache, is this path the same as I used last time? If so pull it out of the cache<br> <fantasai> nical: I have a preference for being explicit about when things expire from cachce<br> <fantasai> dino: There's no way to specify in the API whether your'e going to keep the path<br> <fantasai> dino: Don't know whether you will reuse the path, whether need to keep the path around<br> <fantasai> dino: Unless you use SVG for ...<br> <fantasai> nical: Thought class registered for paint would be stored between invalidations<br> <fantasai> nical: So if that's the case then the web author could store the path objects in there<br> <fantasai> nical: in that case, it's very easy for us to know when things should be flushed out of the cache<br> <fantasai> nical: because it's the lifetime of the object that dictates that<br> <fantasai> nical: Have pref towards doing this rather than heuristic<br> <fantasai> till: That would be the case for this. ?? pressure would ..<br> <fantasai> dbaron: GC would be too slow for that<br> <dbaron> s/would/may well/<br> <fantasai> iank_: Other reason why I prefer not to do that is that existing 2D Path libraries rely on the path to the APIs being on the context<br> <fantasai> iank_: A lot of them work fine with the paint API as is, wouldn't want to put a barrier in front of authors to use the paint API<br> <fantasai> dino: tesselation dependent on transformation<br> <fantasai> dino: Just caching paths would be good, but also want to know the scale, tesselation, etc.<br> <fantasai> dino: No reason to be so accurate if drawing at a tiny scale<br> <fantasai> nical: My specific impl goal doesn't worry about scale<br> <fantasai> dino: When you say store on the class, there's no API for storing<br> <fantasai> iank_: It's .foo<br> <fantasai> dino: If we were going to store the path, I think we'd have a specific API for "please store this path"<br> <fantasai> iank_: I think nical was saying that any new 2d path that's created, it's cached as long as there's a strong reference to it<br> <fantasai> till: Youd' have to say "I still want to use this object", if not it gets discareded?<br> <fantasai> till: As long as you say "use this thing from previous frame" then keep it<br> <fantasai> dino: You do know you've used it because you've drawn it<br> <fantasai> ...<br> <fantasai> dino: Coudl do this without being explicit<br> <fantasai> iank_: Could get pretty far with heuristics<br> <fantasai> till: But that is easier with path2d<br> <fantasai> iank_: We'd just build up the path again insternally and compare to previous paths<br> <fantasai> dino: Conclusion is implementations can go a long way down this path<br> <fantasai> ...<br> <fantasai> nical: Don't have a strong objection, just if we reboot an API, should do something easier to optimize<br> <fantasai> dino: Your request was to remove part of the API, ignoring why<br> <fantasai> dino: I'd say that's pretty strong feedback<br> <fantasai> dino: For actual reason, we think we could optimize paths without removing that API<br> <fantasai> RESOLVED: No change<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/348#issuecomment-319326870 using your GitHub account
Received on Tuesday, 1 August 2017 10:02:14 UTC