Enable clipping and disable v-sync for now
This commit is contained in:
parent
394e599c3a
commit
4a356cfc16
3 changed files with 17 additions and 17 deletions
|
|
@ -183,26 +183,26 @@ impl Stack {
|
|||
}
|
||||
|
||||
pub fn push_clip(&mut self, bounds: Option<Rectangle>) {
|
||||
// self.previous.push(self.current);
|
||||
// self.order.push(Kind::Live);
|
||||
self.previous.push(self.current);
|
||||
self.order.push(Kind::Live);
|
||||
|
||||
// self.current = self.live_count;
|
||||
// self.live_count += 1;
|
||||
self.current = self.live_count;
|
||||
self.live_count += 1;
|
||||
|
||||
// let bounds = bounds.map(|bounds| bounds * self.transformation());
|
||||
let bounds = bounds.map(|bounds| bounds * self.transformation());
|
||||
|
||||
// if self.current == self.live.len() {
|
||||
// self.live.push(Live {
|
||||
// bounds,
|
||||
// ..Live::default()
|
||||
// });
|
||||
// } else {
|
||||
// self.live[self.current].bounds = bounds;
|
||||
// }
|
||||
if self.current == self.live.len() {
|
||||
self.live.push(Live {
|
||||
bounds,
|
||||
..Live::default()
|
||||
});
|
||||
} else {
|
||||
self.live[self.current].bounds = bounds;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn pop_clip(&mut self) {
|
||||
// self.current = self.previous.pop().unwrap();
|
||||
self.current = self.previous.pop().unwrap();
|
||||
}
|
||||
|
||||
pub fn push_transformation(&mut self, transformation: Transformation) {
|
||||
|
|
@ -219,7 +219,6 @@ impl Stack {
|
|||
}
|
||||
|
||||
pub fn iter_mut(&mut self) -> impl Iterator<Item = LayerMut<'_>> {
|
||||
dbg!(self.order.len());
|
||||
let mut live = self.live.iter_mut();
|
||||
let mut cached = self.cached.iter_mut();
|
||||
|
||||
|
|
|
|||
|
|
@ -230,6 +230,7 @@ impl Pipeline {
|
|||
|
||||
*transformation = new_transformation;
|
||||
*target_size = new_target_size;
|
||||
*needs_reupload = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -321,12 +321,12 @@ impl graphics::Compositor for Compositor {
|
|||
&wgpu::SurfaceConfiguration {
|
||||
usage: wgpu::TextureUsages::RENDER_ATTACHMENT,
|
||||
format: self.format,
|
||||
present_mode: self.settings.present_mode,
|
||||
present_mode: wgpu::PresentMode::Immediate,
|
||||
width,
|
||||
height,
|
||||
alpha_mode: self.alpha_mode,
|
||||
view_formats: vec![],
|
||||
desired_maximum_frame_latency: 1,
|
||||
desired_maximum_frame_latency: 0,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue