Bug 1593845 - Ensure picture cache dirty rect is clamped to tile rect. r=sotaro

Differential Revision: https://phabricator.services.mozilla.com/D52493

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Glenn Watson 2019-11-11 08:15:34 +00:00
Родитель 6db9f61fb6
Коммит fd33253d58
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -924,6 +924,11 @@ impl Tile {
self.dirty_rect = self.rect; self.dirty_rect = self.rect;
} }
// Ensure that the dirty rect doesn't extend outside the local tile rect.
self.dirty_rect = self.dirty_rect
.intersection(&self.rect)
.unwrap_or(PictureRect::zero());
// See if this tile is a simple color, in which case we can just draw // See if this tile is a simple color, in which case we can just draw
// it as a rect, and avoid allocating a texture surface and drawing it. // it as a rect, and avoid allocating a texture surface and drawing it.
// TODO(gw): Initial native compositor interface doesn't support simple // TODO(gw): Initial native compositor interface doesn't support simple