diff options
author | Michel Dänzer <mdaenzer@redhat.com> | 2021-07-02 12:41:34 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2021-07-09 15:51:43 +0200 |
commit | 86e645bcfaea63bc3f91e4ccbbc19569929b92c3 (patch) | |
tree | d3de2bda0edbfd7941af84f577cd769959ceb908 /hw | |
parent | ba8763c27b2ebc91850abfcaf32ae972e80142e7 (diff) |
xwayland/eglstream: Drop xwl_eglstream_set_window_pixmap
Not sure why we'd need to abandon a pending stream for a pixmap just
because it's no longer a window pixmap. Let's try not to.
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xwayland/xwayland-glamor-eglstream.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/hw/xwayland/xwayland-glamor-eglstream.c b/hw/xwayland/xwayland-glamor-eglstream.c index ddd7bba6a..b678eaa10 100644 --- a/hw/xwayland/xwayland-glamor-eglstream.c +++ b/hw/xwayland/xwayland-glamor-eglstream.c @@ -60,8 +60,6 @@ struct xwl_eglstream_private { EGLConfig config; - SetWindowPixmapProcPtr SetWindowPixmap; - Bool have_egl_damage; Bool have_egl_stream_flush; @@ -327,31 +325,6 @@ xwl_glamor_eglstream_get_wl_buffer_for_pixmap(PixmapPtr pixmap) return xwl_pixmap->buffer; } -static void -xwl_eglstream_set_window_pixmap(WindowPtr window, PixmapPtr pixmap) -{ - ScreenPtr screen = window->drawable.pScreen; - struct xwl_screen *xwl_screen = xwl_screen_get(screen); - struct xwl_eglstream_private *xwl_eglstream = - xwl_eglstream_get(xwl_screen); - PixmapPtr old_pixmap; - - /* The pixmap for this window has changed. - * If that occurs while there is a stream pending, i.e. before the - * compositor has finished attaching the consumer for the window's - * pixmap's original eglstream, then a producer could no longer be - * attached, so the stream would be useless. - */ - old_pixmap = (*screen->GetWindowPixmap) (window); - if (old_pixmap && old_pixmap != pixmap) - xwl_eglstream_destroy_pending_cb(old_pixmap); - - xwl_screen->screen->SetWindowPixmap = xwl_eglstream->SetWindowPixmap; - (*xwl_screen->screen->SetWindowPixmap)(window, pixmap); - xwl_eglstream->SetWindowPixmap = xwl_screen->screen->SetWindowPixmap; - xwl_screen->screen->SetWindowPixmap = xwl_eglstream_set_window_pixmap; -} - static const char * xwl_eglstream_get_error_str(EGLint error) { @@ -1100,16 +1073,11 @@ error: static Bool xwl_glamor_eglstream_init_screen(struct xwl_screen *xwl_screen) { - struct xwl_eglstream_private *xwl_eglstream = - xwl_eglstream_get(xwl_screen); ScreenPtr screen = xwl_screen->screen; /* We can just let glamor handle CreatePixmap */ screen->DestroyPixmap = xwl_glamor_eglstream_destroy_pixmap; - xwl_eglstream->SetWindowPixmap = screen->SetWindowPixmap; - screen->SetWindowPixmap = xwl_eglstream_set_window_pixmap; - return TRUE; } |