3 ms·
If I recall correctly, the original Macintosh would go as far as telling the software which regions of a window had to be redrawn at any given time so the idea
by II2II 3y ago
If I recall correctly, the original Macintosh would go as far as telling the software which regions of a window had to be redrawn at any given time so the idea itself wasn't exactly new. The thing is that these optimizations required tradeoffs. Figuring out which tiles had to be updated required storing extra data and doing extra computations. Not only did you have to recognize the value of these techniques, you actually had to write the code in a way that did not slow things down (and design the levels so they would not slow things down).
- magicalhippo 3y agoWindows has had this[1] for as long as I remember as well, at least since Windows 3 days so I assume since the very beginning. [1]: https://learn.microsoft.com/en-us/windows/win32/gdi/clipping https://learn.microsoft.com/en-us/windows/win32/gdi/clipping
- peterfirefly 3y agoThey needed the same info to do clipping (on both the Mac and Windows). I think it is more interesting that the pipeline was invalidaterect/region => getevent => event was a draw event => draw region (or part of it). The getevent would only generate draw events if nothing more important was going (keyboard/mouse input, timer, message from other app/desktop accessory). It would also prioritize top windows first so you would only get a draw event for a window at the bottom once the windows above had no more dirty areas. If you really knew what you were doing, you could short circuit this a bit and draw in your windows outside of draw event handling.