#[cfg(all(
feature = "backend-gles",
not(target_arch = "wasm32"),
not(target_vendor = "apple")
))]
pub(crate) fn on_host_gl_context(device: &wgpu::Device) -> bool {
#[expect(
unsafe_code,
reason = "wgpu hands out its GL device only through as_hal"
)]
let device = unsafe { device.as_hal::<wgpu::hal::api::Gles>() };
device.is_some_and(|device| !device.context().is_owned())
}
#[cfg(not(all(
feature = "backend-gles",
not(target_arch = "wasm32"),
not(target_vendor = "apple")
)))]
pub(crate) fn on_host_gl_context(_device: &wgpu::Device) -> bool {
false
}