http://bugs.winehq.org/show_bug.cgi?id=3902
------- Additional Comments From kuba@mareimbrium.org 2005-30-11 12:44 ------- This looks like a reasonable optimization to me. Enlarging the rectangle is a cheap operation, so it shouldn't slow things down. I'd start by doing it only in the BitBlt.
Note that *all* image modifying GDI operations need to either invalidate LastModRect or update it (union with current operation's rect), there's no middle ground. Since invalidation is a matter of setting one coordinate of the rectangle to some magic value, it's cheap too.
Then DoUpdateDIBSection looks whether the rectangle is valid, and if so only copies the indicated part of the DIB around. Otherwise it reverts to current behaviour. After it finishes, the rectangle needs to be set to a zero-sized rectangle.