mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
render/egl: drop wlr_egl_save_context()
This is no longer used.
This commit is contained in:
parent
d5556ec78f
commit
c31d307971
2 changed files with 4 additions and 15 deletions
|
@ -90,13 +90,6 @@ bool wlr_egl_destroy_image(struct wlr_egl *egl, EGLImageKHR image);
|
||||||
|
|
||||||
int wlr_egl_dup_drm_fd(struct wlr_egl *egl);
|
int wlr_egl_dup_drm_fd(struct wlr_egl *egl);
|
||||||
|
|
||||||
/**
|
|
||||||
* Save the current EGL context to the structure provided in the argument.
|
|
||||||
*
|
|
||||||
* This includes display, context, draw surface and read surface.
|
|
||||||
*/
|
|
||||||
void wlr_egl_save_context(struct wlr_egl_context *context);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Restore EGL context that was previously saved using wlr_egl_save_current().
|
* Restore EGL context that was previously saved using wlr_egl_save_current().
|
||||||
*/
|
*/
|
||||||
|
|
12
render/egl.c
12
render/egl.c
|
@ -652,7 +652,10 @@ bool wlr_egl_destroy_image(struct wlr_egl *egl, EGLImage image) {
|
||||||
bool wlr_egl_make_current(struct wlr_egl *egl,
|
bool wlr_egl_make_current(struct wlr_egl *egl,
|
||||||
struct wlr_egl_context *save_context) {
|
struct wlr_egl_context *save_context) {
|
||||||
if (save_context != NULL) {
|
if (save_context != NULL) {
|
||||||
wlr_egl_save_context(save_context);
|
save_context->display = eglGetCurrentDisplay();
|
||||||
|
save_context->context = eglGetCurrentContext();
|
||||||
|
save_context->draw_surface = eglGetCurrentSurface(EGL_DRAW);
|
||||||
|
save_context->read_surface = eglGetCurrentSurface(EGL_READ);
|
||||||
}
|
}
|
||||||
if (!eglMakeCurrent(egl->display, EGL_NO_SURFACE, EGL_NO_SURFACE,
|
if (!eglMakeCurrent(egl->display, EGL_NO_SURFACE, EGL_NO_SURFACE,
|
||||||
egl->context)) {
|
egl->context)) {
|
||||||
|
@ -675,13 +678,6 @@ bool wlr_egl_is_current(struct wlr_egl *egl) {
|
||||||
return eglGetCurrentContext() == egl->context;
|
return eglGetCurrentContext() == egl->context;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlr_egl_save_context(struct wlr_egl_context *context) {
|
|
||||||
context->display = eglGetCurrentDisplay();
|
|
||||||
context->context = eglGetCurrentContext();
|
|
||||||
context->draw_surface = eglGetCurrentSurface(EGL_DRAW);
|
|
||||||
context->read_surface = eglGetCurrentSurface(EGL_READ);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wlr_egl_restore_context(struct wlr_egl_context *context) {
|
bool wlr_egl_restore_context(struct wlr_egl_context *context) {
|
||||||
// If the saved context is a null-context, we must use the current
|
// If the saved context is a null-context, we must use the current
|
||||||
// display instead of the saved display because eglMakeCurrent() can't
|
// display instead of the saved display because eglMakeCurrent() can't
|
||||||
|
|
Loading…
Reference in a new issue