Qt Widgets Rendering Pipeline
felipefarinon.com
felipefarinon.com
However.
I’m puzzled that a software rasteriser can possibly be performant enough for modern UI applications.
If you compare it with other sophisticated UI stacks for example, WPF or chrome (1), you can see a detailed and well considered use of GPU acceleration.
Does qt not do this too? I’m very surprised.
[1] - https://www.chromium.org/developers/design-documents/gpu-acc...
QWidgets is what you're referring to. That's what is used to build traditional desktop applications and is rendered using software by default.
QML/QtQuick is their GPU accelerated scenegraph: https://doc.qt.io/qt-6/qtquick-index.html . It is mostly used in mobile/embedded systems, but they do have desktop components too.
This is misleading. QML was supposed to be the successor of QWidgets. Many big apps use it just fine on the desktop. Sadly many Qt dev themselves (just look at the QtCreator code, do you see any commits using QML there?) do not like QML and so it never really replaced QWigets. Now we have a community that is essentially split and every party cries if one gets more updates then the other. QML still has things like TrayIcon support as a unstable labs preview module, after nearly 10 years. Yes I'm a full time Qt/QML developer and I'm salty about this :*)
Not that you cannot build good desktop applications with QML, but there will be a lot more work for questionable gain.
> lot more work
I would argue the opposite. Show me a none buggy QWidgets application that features nested collapsing menus, with animations. That being said, you can still create a modern app with fancy animations in QWidgets. The beautiful Telegram QtWidgets desktop app is the best example, it's just more work....
QWidgets is for making well integrated, "boring" desktop apps. For nested menus, or any menu for that matter, use QMenu. If your OS is fully supported by Qt and the standard system behavior is to animate the menu, it will be animated in your app.
QWidgets gives you widgets that look like they're desktop widgets, QML gives you a white rectangle.
>Sadly many Qt dev themselves...do not like QML and so it never really replaced QWigets
Says it all, doesn't it. I'm sure everyone's wrong and it's the un-liked framework that's correct, yes?
QtWidgets made creating forms massively easier thanks to QFormLayout and drag and drop designer.
There was nothing similar in QtQuick - Grid and Qt Design Studio were absolutely horrible for this.
With a single codebase, we are running on iOS, Android and web. We do not have our own Rasterizer but we depend on the platform for that. We render in the main UI thread and performance wise we are fine on these three platforms.
Does it support selection? Cut and paste? European languages? Chinese and Arabic? Hiding and showing the virtual keyboard as appropriate?
Rant out of the way, obviously 10x faster is still an order of magnitude faster! I've continued to be curious if there's a way to properly batch geometry in the QT backend to remove all the state-changes that the QT painter is doing that kill performance; a powerfully GPU-accelerated backend for widget based apps would be incredibly useful, although given the dominance of web/electron apps these days not a useful feature for a commercial company to build.
Of course this isn’t to be dismissive of GPUs, they are a welcome addition to the compute stack. But the humble CPU should not be underestimated.
I've been developing the tool for 10 months, and still haven't gone full public. There's still some things to iron out before that. But I hope to publish more about it in the coming weeks.
Google Scholar lists several papers with him as co-author, like the ABCD paper at https://pubs.acs.org/doi/pdf/10.1021/ci700267w which has "3DX supports these functions through a highly finessed UI and a superb rendering engine that delivers fast antialiased graphics with subpixel accuracy." citing "Shemanarev, M. The Anti-Grain Geometry Project. http://www.anti- grain.com (accessed June 1, 2006)."
Of course, you'll have to implement yourself editing between blocks, undo & redo, copy & paste, etc. For me, a big challenge was to synchronize between the state of underlying plain text and the rendered HTML since Qt's conversion is incredibly inconsistent, it requires some annoying small modifications each time.
BTW, there's a high chance I'll open source Plume in the future. I don't fully trust any non-open source app without a transparent build process. But only after I'm sure I figure out a sustainable monetization source.
Why does this not hinder QML to be GPU-accelerated? (Or any other GPU-accelerated UI such as WPF, Flutter)
Data binding allows the runtime to batch and consolidate changes.
Classic Qt also encourages a bad state handling programming style which is hard to optimize. Data binding fixes that and moves more of the responsibility to the framework.
That's how the product is made good.
For one, I think Harfbuzz text shaping underlies Skia, QPainter, and every other text renderer?