egl: log hidden egl errors
This commit is contained in:
parent
bf3e8b4d10
commit
2128f68847
|
@ -18,6 +18,7 @@ pub struct EGLSurface<N: native::NativeSurface> {
|
||||||
config_id: ffi::egl::types::EGLConfig,
|
config_id: ffi::egl::types::EGLConfig,
|
||||||
pixel_format: PixelFormat,
|
pixel_format: PixelFormat,
|
||||||
surface_attributes: Vec<c_int>,
|
surface_attributes: Vec<c_int>,
|
||||||
|
logger: ::slog::Logger,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<N: native::NativeSurface> Deref for EGLSurface<N> {
|
impl<N: native::NativeSurface> Deref for EGLSurface<N> {
|
||||||
|
@ -83,6 +84,7 @@ impl<N: native::NativeSurface> EGLSurface<N> {
|
||||||
config_id: config,
|
config_id: config,
|
||||||
pixel_format,
|
pixel_format,
|
||||||
surface_attributes,
|
surface_attributes,
|
||||||
|
logger: log,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +124,10 @@ impl<N: native::NativeSurface> EGLSurface<N> {
|
||||||
.map_err(SwapBuffersError::EGLCreateWindowSurface)?
|
.map_err(SwapBuffersError::EGLCreateWindowSurface)?
|
||||||
});
|
});
|
||||||
|
|
||||||
result.map_err(|_| SwapBuffersError::EGLSwapBuffers(EGLError::BadSurface))
|
result.map_err(|err| {
|
||||||
|
debug!(self.logger, "Hiding page-flip error *before* recreation: {}", err);
|
||||||
|
SwapBuffersError::EGLSwapBuffers(EGLError::BadSurface)
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue