mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Move warning to correct location (#3484)
It seems that where it was, it warned about the context being recreated in every case, no matter whether the context would actually be recreated or not.
This commit is contained in:
@@ -803,18 +803,19 @@ impl crate::Instance<super::Api> for Instance {
|
||||
}
|
||||
#[cfg(not(feature = "emscripten"))]
|
||||
(Rwh::Wayland(_), raw_window_handle::RawDisplayHandle::Wayland(display_handle)) => {
|
||||
/* Wayland displays are not sharable between surfaces so if the
|
||||
* surface we receive from this handle is from a different
|
||||
* display, we must re-initialize the context.
|
||||
*
|
||||
* See gfx-rs/gfx#3545
|
||||
*/
|
||||
log::warn!("Re-initializing Gles context due to Wayland window");
|
||||
if inner
|
||||
.wl_display
|
||||
.map(|ptr| ptr != display_handle.display)
|
||||
.unwrap_or(true)
|
||||
{
|
||||
/* Wayland displays are not sharable between surfaces so if the
|
||||
* surface we receive from this handle is from a different
|
||||
* display, we must re-initialize the context.
|
||||
*
|
||||
* See gfx-rs/gfx#3545
|
||||
*/
|
||||
log::warn!("Re-initializing Gles context due to Wayland window");
|
||||
|
||||
use std::ops::DerefMut;
|
||||
let display_attributes = [egl::ATTRIB_NONE];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user