1
0
Fork 0
forked from wry/wry

gfx-api: add GfxApi

This commit is contained in:
Julian Orth 2026-02-24 19:56:51 +01:00
parent b604192bf0
commit ca6e3891af
15 changed files with 72 additions and 61 deletions

View file

@ -954,6 +954,9 @@ impl ConfigProxyHandler {
}
fn handle_set_gfx_api(&self, device: Option<DrmDevice>, api: GfxApi) -> Result<(), CphError> {
let Ok(api) = api.try_into() else {
return Err(CphError::UnknownGfxApi(api));
};
match device {
Some(dev) => self.get_drm_device(dev)?.dev.set_gfx_api(api),
_ => self.state.default_gfx_api.set(api),
@ -3532,6 +3535,8 @@ enum CphError {
UnknownBlendSpace(ConfigBlendSpace),
#[error("Unknown bar position {0:?}")]
UnknownBarPosition(BarPosition),
#[error("Unknown gfx API {0:?}")]
UnknownGfxApi(GfxApi),
}
trait WithRequestName {