glamor_egl: override the CloseScreen/DestroyPixmap earlier
Currently we wrap the EGL CloseScreen/DestroyPixmap callbacks after the glamor ones. Thus upon teardown, we'll end calling things in the wrong order. Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
parent
89597eeba6
commit
15354fb68f
|
@ -850,12 +850,6 @@ glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx)
|
|||
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
|
||||
#endif
|
||||
|
||||
glamor_egl->saved_close_screen = screen->CloseScreen;
|
||||
screen->CloseScreen = glamor_egl_close_screen;
|
||||
|
||||
glamor_egl->saved_destroy_pixmap = screen->DestroyPixmap;
|
||||
screen->DestroyPixmap = glamor_egl_destroy_pixmap;
|
||||
|
||||
glamor_ctx->ctx = glamor_egl->context;
|
||||
glamor_ctx->display = glamor_egl->display;
|
||||
|
||||
|
@ -910,6 +904,12 @@ glamor_egl_init(ScreenPtr screen, int fd)
|
|||
|
||||
dixSetPrivate(&screen->devPrivates, &glamor_egl_screen_private_key, glamor_egl);
|
||||
|
||||
glamor_egl->saved_close_screen = screen->CloseScreen;
|
||||
screen->CloseScreen = glamor_egl_close_screen;
|
||||
|
||||
glamor_egl->saved_destroy_pixmap = screen->DestroyPixmap;
|
||||
screen->DestroyPixmap = glamor_egl_destroy_pixmap;
|
||||
|
||||
glamor_egl->fd = fd;
|
||||
glamor_egl->gbm = gbm_create_device(glamor_egl->fd);
|
||||
if (glamor_egl->gbm == NULL) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user