aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-05-20 12:39:35 +0200
committerDrew DeVault <sir@cmpwn.com>2020-05-20 17:39:34 +0200
commitaf2f69e6c1578f848d3e3222804444ff9cff83df (patch)
treeaaf4be2b47d3e1047a24085c4bc74003c382745b /backend/drm
parent72f28ed0b36e4f8a6a8732788bc557533ac36ab1 (diff)
render/egl: unset current context after swapping buffers
After swapping buffers, it doesn't make sense to perform more rendering operations. Unset the context to reflect this. This commit makes it so the context is always only current between wlr_egl_make_current and wlr_egl_swap_buffers. This is an alternative to [1]. [1]: https://github.com/swaywm/wlroots/pull/2212
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/drm.c4
-rw-r--r--backend/drm/renderer.c4
2 files changed, 0 insertions, 8 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 8a16b1f5..65734631 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -556,8 +556,6 @@ static bool drm_connector_commit(struct wlr_output *output) {
}
}
- wlr_egl_unset_current(&drm->renderer.egl);
-
return true;
}
@@ -967,8 +965,6 @@ static bool drm_connector_set_cursor(struct wlr_output *output,
return false;
}
- wlr_egl_unset_current(&plane->surf.renderer->egl);
-
plane->cursor_enabled = true;
}
diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c
index 4d83bf31..c82663e6 100644
--- a/backend/drm/renderer.c
+++ b/backend/drm/renderer.c
@@ -370,8 +370,6 @@ bool drm_surface_render_black_frame(struct wlr_drm_surface *surf) {
wlr_renderer_clear(renderer, (float[]){ 0.0, 0.0, 0.0, 1.0 });
wlr_renderer_end(renderer);
- wlr_egl_unset_current(&surf->renderer->egl);
-
return true;
}
@@ -415,8 +413,6 @@ struct gbm_bo *drm_fb_acquire(struct wlr_drm_fb *fb, struct wlr_drm_backend *drm
return NULL;
}
- wlr_egl_unset_current(&mgpu->renderer->egl);
-
fb->mgpu_bo = gbm_surface_lock_front_buffer(mgpu->gbm);
if (!fb->mgpu_bo) {
wlr_log(WLR_ERROR, "Failed to lock front buffer");