tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 46c59a7ee8f946389bc35d6fad2272f36b8a32c2
parent ee48e485917c6f256be21b2820d32ff91a5955e6
Author: Sotaro Ikeda <sotaro.ikeda.g@gmail.com>
Date:   Thu, 11 Dec 2025 01:01:12 +0000

Bug 1972954 - Check more tile occlusion for layer compositor in PicturePrimitive::take_context() r=gfx-reviewers,gw

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

Diffstat:
Mgfx/wr/webrender/src/picture.rs | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/gfx/wr/webrender/src/picture.rs b/gfx/wr/webrender/src/picture.rs @@ -5324,8 +5324,16 @@ impl PicturePrimitive { // code below. match world_draw_rect { Some(world_draw_rect) => { - // Only check for occlusion on visible tiles that are fixed position. - if tile_cache.spatial_node_index == frame_context.root_spatial_node_index && + let check_occluded_tiles = match frame_state.composite_state.compositor_kind { + CompositorKind::Layer { .. } => { + true + } + CompositorKind::Native { .. } | CompositorKind::Draw { .. } => { + // Only check for occlusion on visible tiles that are fixed position. + tile_cache.spatial_node_index == frame_context.root_spatial_node_index + } + }; + if check_occluded_tiles && frame_state.composite_state.occluders.is_tile_occluded(tile.z_id, world_draw_rect) { // If this tile has an allocated native surface, free it, since it's completely // occluded. We will need to re-allocate this surface if it becomes visible,