Comments (6)
I think it's difficult to even compare Blend2D with a single purpose project that has no source code available. I mean Blend2D can render arbitrary paths, transformed text, it has a composition pipeline, you can have 10k font faces loaded and render them simultaneously, etc... (and I'm not suggesting everybody would need to have 10k font faces loaded, but it's just possible with Blend2D as it doesn't need to do anything fancy to render text, it would just quickly extract the data from the TTF/OTF font and rasterize it).
Just an interesting figure - on my Zen4 machine I can render the Qt-SVG tiger demo at 115fps @ 4K resolution by only using a single thread for rendering (for comparison, Qt can render it at 35fps). And the architecture of these demos is to use QImage which is then blitted by using QPainter, so Blend2D renders to a QImage, then its content is blitted to QPainter's backing store, and then it's finally handled by Qt, most likely by using XShm or something to upload it to GPU backed memory (I'm using a dedicated GPU and X11).
I think on modern machines rendering on CPU is not really a problem - what is interesting is what the 2D library allows you to do, which is something that I would like to focus on - adding more features > making the existing faster.
In other words - performance was never something that Blend2D users complained about - users want features like layers, path-based clipping, path manipulation, and filters/effects. Yeah maybe the only thing where performance should be improved is text rendering by using a glyph cache, and I have already experimented with glyph compression that would be ideal for this task, so this feature is coming as well.
To put more context into this:
I think that if you only have 1 or 2 fonts that you need to render with a very specific text sizes, then you can do a lot of optimizations / precalculations - like creating the mentioned atlas, etc... But if you have a universal library like Blend2D - you cannot count on that. So Blend2D cannot spend 50ms by creating a 2MB font atlas per font, which would only be used once for few glyphs, for example, before the font-face is destroyed. Creating a universal library that can be used for many use cases is much more difficult than creating a library for a very narrow use case.
from blend2d.
Oh, yeah I fully agree.
I read the article with focus on a bit different aspects it seems. Namely what I saw there was the train of thought how to go about the current .
1.The (AFAIK still unsolved) issue of high quality text rendering in 3D can be approached by "leaving it up to the existing proven 2D libraries".
- conclusion for Blend2D: having good text in 3D necessitates the existing 2D font rendering infrastructure
2. For vector graphics, use SDFs in shaders where possible (SDFs which can not be computed that way will stay CPU-computed).
- conclusion for Blend2D: having an API allowing "seamless hybrid CPU/GPU computation" is a great advantage
from blend2d.
Closing as GPU backend is a future plan.
from blend2d.
Sounds encouraging! Thanks.
from blend2d.
Btw. do you already have any ideas or plans about the hybrid CPU/GPU approach? I could not find it in the roadmap https://blend2d.com/roadmap.html .
Thanks!
from blend2d.
Not really at the moment. That would need a lot of experimentation and time, which I don't have, so I want to focus on improving the existing backend.
from blend2d.
Related Issues (20)
- about BLFont question HOT 12
- strokedPath error HOT 1
- Can bled2d be easily ported to rtos? HOT 3
- Rendering of fonts in various national languages HOT 2
- Build failure simdx86_test_avx512.cpp, MingGW-w64, static, cmake/ninja, no tests HOT 4
- clipToRect not correctly applied to fillGlyphRun within rotated context HOT 4
- crash with gcc (Debian 12.2.0-14) 12.2.0 HOT 4
- build errors on Fedora s390x HOT 1
- Crash on blitImage with different image format HOT 4
- ctest of bl_test_unit failed on fedora s390x HOT 5
- Support 8-bit (s)RGBA BLImages? HOT 5
- Unexpected results with BLPattern HOT 3
- close() on path doesn't interact with stroking as expected. HOT 3
- how to do offscreen rendering in qt? HOT 8
- Please, provide tags in Github HOT 8
- BLImage::readFromFile("d:/checkbox.png") ERROR BL_ERROR_INVALID_DATA, //!< Invalid or corrupted data. HOT 2
- VCPKG update - newest version of Blend2D HOT 3
- Incorrect formula in `quadToCubic` HOT 2
- Weird Issue with makeMutable and pixelData HOT 3
- [Portable Pipeline] blitImage produces garbage HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blend2d.