mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 04:45:58 +01:00
render: add wlr_renderer.events.lost
This commit is contained in:
parent
48541d2f2e
commit
31ea61b390
2 changed files with 7 additions and 0 deletions
|
@ -26,6 +26,12 @@ struct wlr_fbox;
|
||||||
struct wlr_renderer {
|
struct wlr_renderer {
|
||||||
struct {
|
struct {
|
||||||
struct wl_signal destroy;
|
struct wl_signal destroy;
|
||||||
|
/**
|
||||||
|
* Emitted when the GPU is lost, e.g. on GPU reset.
|
||||||
|
*
|
||||||
|
* Compositors should destroy the renderer and re-create it.
|
||||||
|
*/
|
||||||
|
struct wl_signal lost;
|
||||||
} events;
|
} events;
|
||||||
|
|
||||||
// private state
|
// private state
|
||||||
|
|
|
@ -44,6 +44,7 @@ void wlr_renderer_init(struct wlr_renderer *renderer,
|
||||||
renderer->impl = impl;
|
renderer->impl = impl;
|
||||||
|
|
||||||
wl_signal_init(&renderer->events.destroy);
|
wl_signal_init(&renderer->events.destroy);
|
||||||
|
wl_signal_init(&renderer->events.lost);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlr_renderer_destroy(struct wlr_renderer *r) {
|
void wlr_renderer_destroy(struct wlr_renderer *r) {
|
||||||
|
|
Loading…
Reference in a new issue