mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-09 02:44:49 +00:00
Assign draw order to surfaces using plane splitter (#3739)
It looks like we neglected to incorporate surfaces into the plane-splitting code path, which assigns each graphics primitive's draw order. This fixes an issue where screensharing frames were not visible when the screenshare tab was zoomed.
This commit is contained in:
commit
a125610f81
1 changed files with 9 additions and 0 deletions
|
@ -104,6 +104,15 @@ impl SceneBuilder {
|
|||
);
|
||||
}
|
||||
|
||||
for (ix, surface) in self.surfaces.iter().enumerate() {
|
||||
let z = layer_z_values[surface.order as LayerId as usize];
|
||||
self.splitter.add(
|
||||
surface
|
||||
.bounds
|
||||
.to_bsp_polygon(z, (PrimitiveKind::Surface, ix)),
|
||||
);
|
||||
}
|
||||
|
||||
// Sort all polygons, then reassign the order field of each primitive to `draw_order`
|
||||
// We need primitives to be repr(C), hence the weird reuse of the order field for two different types.
|
||||
for (draw_order, polygon) in self
|
||||
|
|
Loading…
Reference in a new issue