Aurorae is a decoration engine that allows you easily using third party decoration themes from KDE Store.Aurorae decoration themes at KDE Store (although there are some decoration themes that don’t use Aurorae, e.g. Klassy, but a good chunk of themes found in the Plasma 6 Window Decorations category still use it)It’s been around for quite a while and it has a plenty long history. However, in the recent years, it has been somewhat neglected. The UI trends changed, e.g. rounded corners are all the rage now, but there has been no changes in Aurorae to allow theme creators to follow those trends more easily. There are also performance issues. In comparison to the default Breeze decoration theme, it performs quite poorly, unfortunately.What is Aurorae anyway?In Plasma, we have a C++ library that’s used to implement window decorations called KDecoration. Both Breeze and Aurorae use KDecoration, but the main difference between the two is that the former directly implements a window decoration that follows Breeze style, while the latter is just a very themeable window decoration.Aurorae supports both QML and SVG themes. With a QML theme, you need to write some QML code to define how the window decoration should look and behave. With an SVG theme, you need to provide a bunch of SVG files that specify how the window frame and various buttons look. Under the hood, SVG themes are effectively built as QML themes.QML is pretty cool because with a few lines of code, you can get something that works and looks very decent. But for our usecase, it’s also a heavy tool, and due to the way how QtQuick works, it’s very challenging to have proper fractional scaling support. To be fair, normal applications that use QtQuick are mostly fine, it’s just that we have a pretty unique usecase where we need full control where every individual pixel gets painted.Aurorae V2Recently, I started a rewrite of Aurorae with a few goals in mind. The first goal is to improve performance so KWin doesn’t struggle when you resize a window (just to be clear, no, this doesn’t mean that there are performance issues in QtQuick. The way QML decorations are rendered is inefficient. We render a QtQuick scene in an offscreen texture, then download its contents, and then upload its contents in another texture. These roundtrips kill performance, and they are necessary because of KDecoration API constraints). The second goal is to open up the road for fractional scaling support improvements, like fixing misaligned window border edges or gaps between the decoration and the window contents. The third goal is to prepare the foundation for future improvements and to provide more tools so artists can create themes that reflect “modern” stylistic tendencies.In this rewrite, raw KDecoration and KSvg APIs are used. This makes aurorae decorations quite lightweight and it significantly improves performance. Some fractional scaling issues have already been fixed, while others still need more work. Window decorations are rendered on the CPU side. While, yes, it will be nice to have everything done on the GPU side, doing things on the CPU side is also not that of a big bottleneck right now. In the future, we may follow up on doing more things on the GPU, but for now, it is not high priority.The main focus has been on improving performance issues and preserving compatibility with the previous implementation of SVG decoration themes so decorations look more or less the same way. There may be some (unintentional) differences, but they should be very minimal.What about QML decoration themes then? The main idea behind them is brilliant, but after so many years, there are not that many window decoration themes that use QML. In either case, the original (V1) and rewritten (V2) aurorae engines live side-by-side, but the future of V1 is unclear. QML and SVG decoration themes will use V1 and V2, respectively.Future plansAt the moment, the goal is to continue polishing and optimizing V2. There are certain limits how far we can push things due to the theme format. Some parts of the theme force us to do some things, which ideally we shouldn’t do.It’s highly likely (not saying this for sure though!) that there will be a V3, which is going to address some theme limitations and add support for new features, for example rounding bottom window corners or outlines.If you’re a decoration theme creator and would like to see some particular feature in Aurorae, feel free to reach out to me (@zzag) on Matrix (e.g. in #kwin) or file a feature request at https://bugs.kde.org (product: kwin; component: aurorae).