backend/drm: add missing wlr_egl_unset_current
This commit is contained in:
parent
cfed5766b7
commit
d28a7da95d
|
@ -967,6 +967,8 @@ static bool drm_connector_set_cursor(struct wlr_output *output,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wlr_egl_unset_current(&plane->surf.renderer->egl);
|
||||||
|
|
||||||
plane->cursor_enabled = true;
|
plane->cursor_enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -361,15 +361,17 @@ void drm_fb_move(struct wlr_drm_fb *new, struct wlr_drm_fb *old) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool drm_surface_render_black_frame(struct wlr_drm_surface *surf) {
|
bool drm_surface_render_black_frame(struct wlr_drm_surface *surf) {
|
||||||
struct wlr_renderer *renderer = surf->renderer->wlr_rend;
|
|
||||||
|
|
||||||
if (!drm_surface_make_current(surf, NULL)) {
|
if (!drm_surface_make_current(surf, NULL)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct wlr_renderer *renderer = surf->renderer->wlr_rend;
|
||||||
wlr_renderer_begin(renderer, surf->width, surf->height);
|
wlr_renderer_begin(renderer, surf->width, surf->height);
|
||||||
wlr_renderer_clear(renderer, (float[]){ 0.0, 0.0, 0.0, 1.0 });
|
wlr_renderer_clear(renderer, (float[]){ 0.0, 0.0, 0.0, 1.0 });
|
||||||
wlr_renderer_end(renderer);
|
wlr_renderer_end(renderer);
|
||||||
|
|
||||||
|
wlr_egl_unset_current(&surf->renderer->egl);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -413,6 +415,8 @@ struct gbm_bo *drm_fb_acquire(struct wlr_drm_fb *fb, struct wlr_drm_backend *drm
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wlr_egl_unset_current(&mgpu->renderer->egl);
|
||||||
|
|
||||||
fb->mgpu_bo = gbm_surface_lock_front_buffer(mgpu->gbm);
|
fb->mgpu_bo = gbm_surface_lock_front_buffer(mgpu->gbm);
|
||||||
if (!fb->mgpu_bo) {
|
if (!fb->mgpu_bo) {
|
||||||
wlr_log(WLR_ERROR, "Failed to lock front buffer");
|
wlr_log(WLR_ERROR, "Failed to lock front buffer");
|
||||||
|
|
Loading…
Reference in New Issue