diff options
author | wm4 <wm4@nowhere> | 2017-08-14 19:57:44 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-08-14 19:57:44 +0200 |
commit | df8cc84f4782334015393b2dee669830d1cca516 (patch) | |
tree | ba0889281df8e29619a5c5ed86c79cd2a6f4789e /video/out/vo_opengl.c | |
parent | 68201f4591bd07c7d7027d50fdb6cc5500c7382c (diff) | |
download | mpv-df8cc84f4782334015393b2dee669830d1cca516.tar.bz2 mpv-df8cc84f4782334015393b2dee669830d1cca516.tar.xz |
vo_opengl: remove DR image layouting code to renderer
No reason to have it in a higher level.
Diffstat (limited to 'video/out/vo_opengl.c')
-rw-r--r-- | video/out/vo_opengl.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index 5e8a3c7110..02a7318970 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -350,32 +350,12 @@ static void wait_events(struct vo *vo, int64_t until_time_us) } } -static void vo_opengl_free_dr(void *opaque, uint8_t *data) -{ - struct gl_priv *p = opaque; - gl_video_dr_free_buffer(p->renderer, data); -} - static struct mp_image *get_image(struct vo *vo, int imgfmt, int w, int h, int stride_align) { struct gl_priv *p = vo->priv; - int size = mp_image_get_alloc_size(imgfmt, w, h, stride_align); - if (size < 0) - return NULL; - - int alloc_size = size + stride_align; - void *ptr = gl_video_dr_alloc_buffer(p->renderer, alloc_size); - if (!ptr) - return NULL; - - struct mp_image *res = mp_image_from_buffer(imgfmt, w, h, stride_align, - ptr, alloc_size, p, - vo_opengl_free_dr); - if (!res) - gl_video_dr_free_buffer(p->renderer, ptr); - return res; + return gl_video_get_image(p->renderer, imgfmt, w, h, stride_align); } static void uninit(struct vo *vo) |