1
0
Fork 0
forked from wry/wry

wl_surface: handle alpha modes

This commit is contained in:
Julian Orth 2026-02-21 14:24:38 +01:00
parent 37674a229c
commit 69ca5d92e7
10 changed files with 82 additions and 25 deletions

View file

@ -3,7 +3,7 @@ use {
async_engine::AsyncEngine,
fixed::Fixed,
format::ARGB8888,
gfx_api::{AcquireSync, GfxContext, GfxError, GfxTexture, ReleaseSync},
gfx_api::{AcquireSync, AlphaMode, GfxContext, GfxError, GfxTexture, ReleaseSync},
rect::Rect,
renderer::Renderer,
scale::Scale,
@ -398,6 +398,7 @@ fn render_img(image: &InstantiatedCursorImage, renderer: &mut Renderer, x: Fixed
ReleaseSync::None,
false,
renderer.state.color_manager.srgb_gamma22(),
AlphaMode::PremultipliedElectrical,
);
}
}
@ -423,6 +424,7 @@ impl Cursor for StaticCursor {
ReleaseSync::None,
false,
renderer.state.color_manager.srgb_gamma22(),
AlphaMode::PremultipliedElectrical,
);
}
}
@ -466,6 +468,7 @@ impl Cursor for AnimatedCursor {
ReleaseSync::None,
false,
renderer.state.color_manager.srgb_gamma22(),
AlphaMode::PremultipliedElectrical,
);
}
}