2 ms·
"Am I right guessing that UI frameworks do something similar?" most of them try to avoid the update() loop because UI elements usually only change if the appli
by fxtentacle 3y ago
"Am I right guessing that UI frameworks do something similar?"
most of them try to avoid the update() loop because UI elements usually only change if the application state changes (and then you call paint() or invalidate()) or if the window moves or gets dis-occluded (then the OS calls invalidate()) or if the mouse cursor moves.
So typically, the UI framework will have a "dirty" rectangle flag which represents the pixel area that needs to be redrawn.