Merge remote-tracking branch 'upstream/master' into yoda-wayland-only

# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	wgpu/Cargo.toml
#	wgpu/src/window/compositor.rs
This commit is contained in:
Lionel DARNIS 2026-08-19 21:44:35 +02:00
commit d24bcd0272
36 changed files with 475 additions and 209 deletions

View file

@ -83,13 +83,20 @@ impl<T: Layer> Stack<T> {
/// Pushes a new clipping region in the [`Stack`]; creating a new layer in the
/// process.
pub fn push_clip(&mut self, bounds: Rectangle) {
let bounds = bounds * self.transformation();
let bounds = bounds
.intersection(&self.layers[self.current].bounds())
.unwrap_or(Rectangle {
width: 0.0,
height: 0.0,
..bounds
});
self.previous.push(self.current);
self.current = self.active_count;
self.active_count += 1;
let bounds = bounds * self.transformation();
if self.current == self.layers.len() {
self.layers.push(T::with_bounds(bounds));
} else {