mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-25 08:32:30 +00:00
render: add wlr_renderer.events.lost
This commit is contained in:
parent
48541d2f2e
commit
31ea61b390
@ -26,6 +26,12 @@ struct wlr_fbox;
|
||||
struct wlr_renderer {
|
||||
struct {
|
||||
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;
|
||||
|
||||
// private state
|
||||
|
@ -44,6 +44,7 @@ void wlr_renderer_init(struct wlr_renderer *renderer,
|
||||
renderer->impl = impl;
|
||||
|
||||
wl_signal_init(&renderer->events.destroy);
|
||||
wl_signal_init(&renderer->events.lost);
|
||||
}
|
||||
|
||||
void wlr_renderer_destroy(struct wlr_renderer *r) {
|
||||
|
Loading…
Reference in New Issue
Block a user