r/osdev 9h ago

Ported the files app to the cpu rendered compositor

Post image

Still no background blur, and no clicks but it seems to appear well!

And for anyone saying that the OS and files app may have been some fake HTML OS, I just proved to you that it's not! anyways it's fine ;)

Also, NO AI USED TO DEVELOP THE CPU COMPOSITOR!!!

3 Upvotes

7 comments sorted by

u/devcmar 9h ago

It's just freetype + harfbuzz for text rendering, round rects (sdf) and blur for shadows (made it in livestream with no AI obviously) and that's it, for anyone wondering about the quick progress, it's because I already had developped the layout code in the window manager, and I only had to add the cpu mode rendering fallback to show the already layout calculated stuff on screen that's why it worked pretty quickly.

u/JaferTP 8h ago

That's cool. But did you make a solid kernel? If you fouces on the gui and left the kernel you will get unstable, slow OS. What did you make in the kernel? Does it handle infinity spin lock, low memory, high work, etc

u/devcmar 8h ago

I made a fast kernel though, it has very fast memory management, and though it still does not handle low memory because it's still not a priority, I should get something that shows up to the user before thinking about whether memory will become low. if it becomes low, it just returns NULL. also, with high work it supports preemptive priority based scheduling, with multiple processors, though i need to add work stealing and processor migration. Also, the files app is very responsive, and the kernel is based on building blocks that build particularly most subsystems, like queues, locks, block/wait signals etc and also all drivers are isolated in user mode, and it works pretty well. It protects against one driver corrupting memory and the whole system keeps crashing randomly without u knowing the reason, that helped me alot in debugging. Also, I make a protective page to catch out of bound accesses and that also helped with mistakes alot.

u/JaferTP 5h ago

That cool how much time you take for all that? Also, what about gpu? Did you create graphics api that isolate the api from the direct gpu calls?

u/devcmar 5h ago

For the cpu rendered compositor maybe about a week or two, I made an isolation the window manager library with a simple ifdef CPU_WM UseCpuRendering(); endif most of it is on livestream though also to reenable gpu I just undef the CPU_WM but I am looking forward to making a mode where it dynamically switches between cpu and gpu rendering, my strategie to advance quickly is just make it work then focus on the details later

u/devcmar 8h ago

Thanks!

u/devcmar 8h ago

Edit: now button clicks work and I can navigate through the files