Bug 1597559 - Fix tile opacity getting out of sync with compositor surface. r=sotaro

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Glenn Watson 2019-12-04 02:10:17 +00:00
Родитель 2625fe32a5
Коммит 6e5ebeba2a
1 изменённых файлов: 7 добавлений и 5 удалений

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

@ -865,11 +865,6 @@ impl Tile {
return false;
}
// Check if this tile can be considered opaque.
let tile_is_opaque = ctx.backdrop.rect.contains_rect(&self.clipped_rect);
let opacity_changed = tile_is_opaque != self.is_opaque;
self.is_opaque = tile_is_opaque;
// Invalidate the tile based on the content changing.
self.update_content_validity(ctx, state);
@ -878,6 +873,13 @@ impl Tile {
return false;
}
// Check if this tile can be considered opaque. Opacity state must be updated only
// after all early out checks have been performed. Otherwise, we might miss updating
// the native surface next time this tile becomes visible.
let tile_is_opaque = ctx.backdrop.rect.contains_rect(&self.clipped_rect);
let opacity_changed = tile_is_opaque != self.is_opaque;
self.is_opaque = tile_is_opaque;
// Check if the selected composite mode supports dirty rect updates. For Draw composite
// mode, we can always update the content with smaller dirty rects. For native composite
// mode, we can only use dirty rects if the compositor supports partial surface updates.