diff options
author | Thomas Hellstrom <[email protected]> | 2017-08-11 09:57:51 +0200 |
---|---|---|
committer | Thomas Hellstrom <[email protected]> | 2017-08-17 07:39:42 +0200 |
commit | 5198e48a0d9a991d897cf4c71fdb82ac0e43b025 (patch) | |
tree | 59cd9ea2252ce9f7e1ed78ffb396093732727340 /src/loader | |
parent | 934511d1f3a8e2e9b0091d725c87a22a51233141 (diff) |
loader_dri3/glx/egl: Remove the loader_dri3_vtable get_dri_screen callback
It's not very usable since in the rare, but definitely existing case that
we don't have a current context, it will return NULL.
Presumably it will always be safe to use the dri screen the drawable was
created with for operations on that drawable.
Signed-off-by: Thomas Hellstrom <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/loader')
-rw-r--r-- | src/loader/loader_dri3_helper.c | 12 | ||||
-rw-r--r-- | src/loader/loader_dri3_helper.h | 1 |
2 files changed, 1 insertions, 12 deletions
diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c index 9d241302918..5346d0757df 100644 --- a/src/loader/loader_dri3_helper.c +++ b/src/loader/loader_dri3_helper.c @@ -1116,7 +1116,6 @@ dri3_get_pixmap_buffer(__DRIdrawable *driDrawable, unsigned int format, xcb_sync_fence_t sync_fence; struct xshmfence *shm_fence; int fence_fd; - __DRIscreen *cur_screen; if (buffer) return buffer; @@ -1147,17 +1146,8 @@ dri3_get_pixmap_buffer(__DRIdrawable *driDrawable, unsigned int format, if (!bp_reply) goto no_image; - /* Get the currently-bound screen or revert to using the drawable's screen if - * no contexts are currently bound. The latter case is at least necessary for - * obs-studio, when using Window Capture (Xcomposite) as a Source. - */ - cur_screen = draw->vtable->get_dri_screen(draw); - if (!cur_screen) { - cur_screen = draw->dri_screen; - } - buffer->image = loader_dri3_create_image(draw->conn, bp_reply, format, - cur_screen, draw->ext->image, + draw->dri_screen, draw->ext->image, buffer); if (!buffer->image) goto no_image; diff --git a/src/loader/loader_dri3_helper.h b/src/loader/loader_dri3_helper.h index af42425df7f..34498c93ff5 100644 --- a/src/loader/loader_dri3_helper.h +++ b/src/loader/loader_dri3_helper.h @@ -100,7 +100,6 @@ struct loader_dri3_vtable { void (*set_drawable_size)(struct loader_dri3_drawable *, int, int); bool (*in_current_context)(struct loader_dri3_drawable *); __DRIcontext *(*get_dri_context)(struct loader_dri3_drawable *); - __DRIscreen *(*get_dri_screen)(struct loader_dri3_drawable *); void (*flush_drawable)(struct loader_dri3_drawable *, unsigned); void (*show_fps)(struct loader_dri3_drawable *, uint64_t); }; |