5 ms·
Modern UI frameworks mostly try to offload the rendering to the gpu where just every pixel is rendered for every frame into texture buffers. But of course that
by chme 7y ago
Modern UI frameworks mostly try to offload the rendering to the gpu where just every pixel is rendered for every frame into texture buffers.
But of course that can be combined with diff&patch as well...
- vsskanth 7y agoYes I am especially curious to know how they manage state in desktop GUIs - if it's events and callback based or some other kind of functional architecture
- pjmlp 7y agoIn what concerns WPF, UWP (you can do this with forms as well although support is more primitive), via data bindings. The concept is somehow complex to master, I compare it to getting monads to click, but when you understand it, you are able to envision how to build the full UI architecture as having a Lego box at your disposal. For everything, views, stylesheets, event handlers, data models.
- int_19h 7y agoIt's usually event callbacks for actions, although these are often wrapped in a first-class "action" or "command" abstractions, to allow routing different events to the same handler - e.g. both the menu item and the toolbar button. For views, you either get some form of MVP, with explicitly implemented model interfaces that provide the glue between the views and the object tree they are representing, or data binding that effectively creates that same glue for you. Here's an example from UWP: https://docs.microsoft.com/en-us/windows/uwp/data-binding/data-binding-quickstart https://docs.microsoft.com/en-us/windows/uwp/data-binding/da... So no, it's not really functional. Quite the opposite - the state is global and mutable, and UX actions that purport change things really change them. That also makes it all very intuitive, though.
- kllrnohj 7y ago> But of course that can be combined with diff&patch as well... Which they are, through extensions such as https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_partial_update.txt https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_...
- IshKebab 7y agoNot every pixel! Mozilla posted recently about how they have gone to great lengths to not redraw every pixel every frame because it saves battery. Apparently Chrome and Safari already do that.