mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 807299 - Fix incorrect progressive update cancelling. r=bgirard
Sometimes the rounding error on display ports is over a pixel - in this case, progressive updates may be cancelled incorrectly and cause drawing to be missed until the next invalidation (assuming that isn't also incorrectly cancelled).
This commit is contained in:
parent
f5b4cb0cee
commit
06198ad8de
@ -376,16 +376,17 @@ public class GeckoLayerClient
|
||||
// XXX All sorts of rounding happens inside Gecko that becomes hard to
|
||||
// account exactly for. Given we align the display-port to tile
|
||||
// boundaries (and so they rarely vary by sub-pixel amounts), just
|
||||
// check that values are within a pixel of the display-port bounds.
|
||||
// check that values are within a couple of pixels of the
|
||||
// display-port bounds.
|
||||
|
||||
// Never abort drawing if we can't be sure we've sent a more recent
|
||||
// display-port. If we abort updating when we shouldn't, we can end up
|
||||
// with blank regions on the screen and we open up the risk of entering
|
||||
// an endless updating cycle.
|
||||
if (Math.abs(displayPort.getLeft() - x) <= 1 &&
|
||||
Math.abs(displayPort.getTop() - y) <= 1 &&
|
||||
Math.abs(displayPort.getBottom() - (y + height)) <= 1 &&
|
||||
Math.abs(displayPort.getRight() - (x + width)) <= 1) {
|
||||
if (Math.abs(displayPort.getLeft() - x) <= 2 &&
|
||||
Math.abs(displayPort.getTop() - y) <= 2 &&
|
||||
Math.abs(displayPort.getBottom() - (y + height)) <= 2 &&
|
||||
Math.abs(displayPort.getRight() - (x + width)) <= 2) {
|
||||
return mProgressiveUpdateData;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user