1
0
Fork 0
forked from wry/wry

vulkan: optimize shm handling

This commit is contained in:
Julian Orth 2024-05-23 22:30:30 +02:00
parent 03c02be34c
commit af80fada6c
14 changed files with 629 additions and 413 deletions

View file

@ -427,10 +427,10 @@ impl Renderer<'_> {
};
}
render!(&children.below);
self.render_buffer(&buffer, alpha, x, y, *tpoints, size, bounds);
self.render_buffer(surface, &buffer, alpha, x, y, *tpoints, size, bounds);
render!(&children.above);
} else {
self.render_buffer(&buffer, alpha, x, y, *tpoints, size, bounds);
self.render_buffer(surface, &buffer, alpha, x, y, *tpoints, size, bounds);
}
if let Some(result) = self.result.as_deref_mut() {
{
@ -446,6 +446,7 @@ impl Renderer<'_> {
pub fn render_buffer(
&mut self,
surface: &WlSurface,
buffer: &Rc<SurfaceBuffer>,
alpha: Option<f32>,
x: i32,
@ -454,7 +455,7 @@ impl Renderer<'_> {
tsize: (i32, i32),
bounds: Option<&Rect>,
) {
if let Some(tex) = buffer.buffer.texture.get() {
if let Some(tex) = buffer.buffer.get_texture(surface) {
self.base.render_texture(
&tex,
alpha,