summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-07-02 14:46:00 +0200
committerNiklas Haas <github-daiK1o@haasn.dev>2023-07-02 16:20:48 +0200
commitd2c28bc4dfd70643a88564472ffb84af2c20fcff (patch)
tree7b2dbd1f55d9d46a127ff9be5d436d2981d20d49 /video
parentb73d96776cfee61f88bf60b27315baab32a2115d (diff)
downloadmpv-d2c28bc4dfd70643a88564472ffb84af2c20fcff.tar.bz2
mpv-d2c28bc4dfd70643a88564472ffb84af2c20fcff.tar.xz
vo_gpu_next: remove synchronization from info_callback
VOCTRL is processed on VO thread.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo_gpu_next.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c
index eee95c861b..a8e8e1fae5 100644
--- a/video/out/vo_gpu_next.c
+++ b/video/out/vo_gpu_next.c
@@ -150,7 +150,6 @@ struct priv {
int num_user_hooks;
// Performance data of last frame
- pthread_mutex_t perf_lock;
struct frame_info perf_fresh;
struct frame_info perf_redraw;
@@ -763,12 +762,8 @@ static void info_callback(void *priv, const struct pl_render_info *info)
default: abort();
}
- pthread_mutex_lock(&p->perf_lock);
-
frame->count = info->index + 1;
pl_dispatch_info_move(&frame->info[info->index], info->pass);
-
- pthread_mutex_unlock(&p->perf_lock);
}
static void update_options(struct vo *vo)
@@ -1333,11 +1328,9 @@ static int control(struct vo *vo, uint32_t request, void *data)
return VO_TRUE;
case VOCTRL_PERFORMANCE_DATA: {
- pthread_mutex_lock(&p->perf_lock);
struct voctrl_performance_data *perf = data;
copy_frame_info_to_mp(&p->perf_fresh, &perf->fresh);
copy_frame_info_to_mp(&p->perf_redraw, &perf->redraw);
- pthread_mutex_unlock(&p->perf_lock);
return true;
}
@@ -1441,7 +1434,6 @@ static void uninit(struct vo *vo)
pl_renderer_destroy(&p->rr);
- pthread_mutex_destroy(&p->perf_lock);
for (int i = 0; i < VO_PASS_PERF_MAX; ++i) {
pl_shader_info_deref(&p->perf_fresh.info[i].shader);
pl_shader_info_deref(&p->perf_redraw.info[i].shader);
@@ -1486,7 +1478,6 @@ static int preinit(struct vo *vo)
hwdec_devices_set_loader(vo->hwdec_devs, load_hwdec_api, vo);
ra_hwdec_ctx_init(&p->hwdec_ctx, vo->hwdec_devs, gl_opts->hwdec_interop, false);
pthread_mutex_init(&p->dr_lock, NULL);
- pthread_mutex_init(&p->perf_lock, NULL);
p->rr = pl_renderer_create(p->pllog, p->gpu);
p->queue = pl_queue_create(p->gpu);