6 ms·
Fast UI Draw is a library that provides a higher performance Canvas interface
- adamnemecek 6y agoThey should have some screenshots.
- Cthulhu_ 6y agoFrom my understanding, it's not a UI library but a library to make UI libraries with; therefore, it does not have any visual / interaction design or anything clickable to work with. That said, a video demonstrating the performance difference would be nice.
- chrisseaton 6y agoScreenshots of what? Some shapes?
- mcphage 6y agoTricky situations where it’s hard to do the correct thing. Like the Acid browser tests.
- chrisseaton 6y agoIt's a C++ library for drawing - I know it has 'Canvas' in the description but it's not a browser or layout thing - the Acid tests aren't applicable.
- mcphage 6y agoSorry, I included the Acid tests as an example of demonstrating tricky situations—not that this should be implementing the acid tests themselves. So like, what is the equivalent of the Acid tests for drawing libraries?
- xaedes 6y agoYes, screenshots of the demo examples.
- danschumann 6y agocould be cool but it should just provide an example `<script src="..."></script>` from a cdn or something. Quick start!
- tkzed49 6y agoI think it's a native C++ library but I agree with your sentiment
- DuncanMak 6y agoI found some slides: https://memcpy.io/files/2016-09-23/xdc-2016-fast_ui_draw.pdf https://memcpy.io/files/2016-09-23/xdc-2016-fast_ui_draw.pdf
- Jasper_ 6y agoNote that this has been practically unmaintained since Kevin Rogovin (fastuidraw's principal author) left Intel. It's also very suspect, my recollection from testing it before is that it was not up to the quality and fidelity standards of other libraries.
- CameronNemo 6y agoA lot of Intel open source projects turn into abandonware. libva/VAAPI is one that comes to mind. Furthermore they have some bad incentives around portability.
- bepvte 6y agoVaapi recently got AV1 support.
- lenkite 6y agoSo why would one use this over something battle-tested like Skia ? https://skia.org/ https://skia.org/
- unwind 6y agoIn the (brief) benchmark in the PDF posted by @DuncanMak says FastUIDraw is around 5-8 times faster than Skia.
- throwaway546456 6y agothe slides are from 2016. I'm wondering how performance comparison would look like these days with metal or vulkan rendering backends.
- The_rationalist 6y agoFrom what I recall, don't expect more than 20% performance improvements with Vulkan on common 2D scenes
- kllrnohj 6y agoNote that the test scene would benefit heavily from draw batching, but was setup in such a way that may have just defeated the batching logic in Skia but not the one in FastUIDraw. It wasn't a very common UI scene, so it wouldn't be expected that other libraries had optimizations for that type of content (specifically with the "everything is slightly rotated" part) It was also a scene that curiously didn't involve any paths or shapes other than rectangles, which is where GPU-accelerated canvas' all really run into trouble. Also note that the presentation was from 2016, and many of these libraries (such as Skia) see heavy ongoing work so that data is all quite outdated and unreliable at this point.
- johnnycerberus 6y agoSkia is an awesome C++ library.
- kevingadd 6y ago
- Kiro 6y agoWhat is "Canvas interface" referring to here? I thought it was about the browser Canvas API but I see nothing pointing toward that.
- unwind 6y agoIt seems to refer to the "rendering backend" used to paint user interfaces, as in actual/native elements. The PDF linked to by @DuncanMak compares it performance-wise to things like Cairo (the canvas library used by GTK+), Qt Raster, and SKIA GL). It seems to perform very well in comparison.
- dsego 6y agoAfaik a canvas interface is where you draw to a bitmap by issuing calls in a procedural style (eg web canvas, cairo graphics etc). This is in contrast to vector graphics where you build an object hierarchy to be rendered.
- PaulDavisThe1st 6y agoThat's almost backwards from my understanding of those terms, but oh well ....
- dsego 6y agoSure, can you share your understanding?
- PaulDavisThe1st 6y agoVector graphics: drawing stuff by issuing commands to render specific simple geometric elements (lines, rects, triangles, circles) Canvas: a context in which to place "objects" in 3 dimensions (x, y and z), and have them appropriately re-rendered when necessary (motion, object addition/removal)
- dsego 6y ago
- koonsolo 6y agoThe standard Canvas API is probably your best option. So if some library claims to have better performance than Canvas 2D, I would love to see a benchmark on that. Anyone would assume WebGL is faster, but as you know "assumption is the mother of all fuckups". Let me explain. A year ago, I had to make a proof of concept for drawing Gantt charts on a Canvas. Coming from a game development background, my assumption was that some things would be too slow on a canvas: - rotating graphics - drawing an insane amount of rectangles - filling surfaces with a certain repeating texture So I also included a benchmark of Canvas vs WebGL. The conclusion was that for most things, Canvas was faster: - rotating graphics - texturizing - etc. This really amazed me, because as an old school game developer, I know all limitations of 2D rendering. The thing is, all modern browsers heavily optimize their Canvas to the GPU. Even the older Edge. Do some heavy Canvas 2D drawing, and see your GPU usage spikes. Plus, rendering text on WebGL is not as straightforward. However, there was a tipping point when drawing an insane amount of rectangles (which basically become dots), where WebGL would take over. So for this project, the simplicity of the Canvas API, the text rendering, and the performance were definitely a sure way to use that one instead of a more complex, slower WebGL.
- st_goliath 6y agoThe link points to a C++ library that provides accelerated drawing of 2D shapes, apparently intended to be used for UI rendering. This is not about HTML5 Canvas vs something WebGL based. A browser could theoretically use this tough to implement Canvas elements. See this issue: https://github.com/intel/fastuidraw/issues/50 https://github.com/intel/fastuidraw/issues/50
- fotad 6y agoTried on Raspberry Pi 4, all examples draw nothing but blank screen
- bionhoward 6y agoHow could someone use this in a product given the MPL-2.0 license?
- folz 6y ago(Disclaimer: Not a lawyer, but a number of my projects are licensed under MPL) As I read it, the only time the MPL requires you to share source code is when you modify files belonging to the MPL-covered library. Even then, it only requires you to share the changes you made to the library - you don't have to share any of your proprietary or non-MPL code. From TL;DRLegal: "You must make the source code for any of your changes available under MPL, but you can combine the MPL software with proprietary code, as long as you keep the MPL code in separate files." So - did you install a MPL library using a package manager like npm or pip? You do not have to share your project's code. Did you copy/paste a MPL library into a /vendor/mpl-library/ directory? You do not have to share your projects code. Did you copy/paste functions from a MPL library directly into your source code? In this case, you may have to share the file you pasted into, but not any other files in your project. Overall, I think the MPL strikes a great balance between the "do what you want" crowd and the "people should give back to projects that help them" crowd, which is why it's my go-to license for most libraries these days.