back

by mpweiher·11d ago·view on hn ↗
> Well, [throwing away the complete rendered graphics] is what "retained mode" GUIs (i.e. those using control/widget trees and such) do too.

That turns out not to be the case.

The widget tree is retained.

When changes come in, the resulting damage from those changes is assessed and then the damaged parts are redrawn in an optimized fashion.

https://developer.apple.com/documentation/AppKit/NSView/draw...

1 comments
This is an optimization that some GUI systems do but it is not inherent to "retained mode" GUIs, does not apply to all systems nor all systems use it. I remember GUI systems even from late 90s/early 2000s composing their widget trees afresh when needed (and in games it was pretty much always the norm for GUI systems to work like that after engine started taking GPUs for granted). Some would limit the refresh to widgets overlapping the damage region reported by the OS (if a compositor was not running, for OSes since Vista) but even that is just an optimization.

On the other hand immediate mode GUIs are inherently like that because that is their core premise.