Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple SVG primitives #402

Open
jdm opened this issue Sep 14, 2016 · 11 comments
Open

Add simple SVG primitives #402

jdm opened this issue Sep 14, 2016 · 11 comments
Assignees

Comments

@jdm
Copy link
Member

jdm commented Sep 14, 2016

Note: this is part of the NCSU SVG project; please don't work on this without talking with me first.

This task requires:

  • adding an SVGGeometry display item which represents a solid colored circle
  • adding add_geometry and remove_geometry APIs (analogous to the existing add_image and remove_image APIs)
  • something analogous to get_glyph_dimensions (ie. rasterize the geometry in parallel) (TODO)
  • something related to compositing the new display items (TODO)

Code: webrender_traits/src/api.rs, webrender_traits/src/types.rs

@glennw If you can help fill out the details here, that would be great. I was basing this on servo/servo#12973 (comment)

@splav
Copy link
Contributor

splav commented Oct 17, 2016

Can I take this since #402 appears to depend on it?

@jdm
Copy link
Member Author

jdm commented Oct 17, 2016

Yep!

@jrmuizel jrmuizel mentioned this issue Nov 7, 2016
24 tasks
@jrmuizel
Copy link
Collaborator

jrmuizel commented Nov 7, 2016

For now, it's probably best to just rely on Skia or Cairo to rasterize, stroke and dash the path geometry into a A8 texture that's uploaded to the GPU. In the future we can look at more sophisticated GPU techniques.

FWIW, both of Direct2D's rasterization techniques seem like good options:

  1. scanline converting to a mesh instead of a bitmap (will work on any hardware)
  2. target independent rasterization (requires D3D 11.1 level)

@jdm
Copy link
Member Author

jdm commented Dec 14, 2016

@splav Have you made progress on this? @kvark is interested in working on it.

@splav
Copy link
Contributor

splav commented Dec 21, 2016 via email

@emilio
Copy link
Member

emilio commented Dec 21, 2016

Thanks for replying, and get well! :)

@kvark kvark self-assigned this Jan 13, 2017
@kvark
Copy link
Member

kvark commented Feb 8, 2017

We (as in - Quantum Rendering team) came up with a different API to provide SVG support:
https://public.etherpad-mozilla.org/p/wr-toronto#lineNumber=176

First preparations are already in flight - #852
There are no plans currently to have SVG primitives defined as proposed in this issue, so I suppose it should be closed, but leaving this luxury to @jdm.

@kvark kvark removed their assignment Feb 8, 2017
@jdm jdm closed this as completed Feb 8, 2017
@jrmuizel
Copy link
Collaborator

jrmuizel commented Feb 8, 2017

I think it's probably still worth pursuing this approach. I think there's still value in having webrender understand the scene as much as possible. However, we'll likely use the vector image support in Gecko first.

@jdm
Copy link
Member Author

jdm commented Mar 18, 2017

@askalski expressed interest and experience with rendering and SVG. Is there some way they could contribute to this effort? They've made a number of contributions to Servo proper in the past.

@glennw
Copy link
Member

glennw commented Mar 19, 2017

Yes - we'd still like to have direct SVG support in WR eventually, so it could be fine to start working on that. It won't overlap / interfere with the current gecko plans, which is a good thing.

@njskalski
Copy link

well, to be honest I am a typical coder, not an architect. I leave the technical decisions to you guys, just show me the list I can pick tickets from :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants