mirror of
https://github.com/mpv-player/mpv
synced 2024-12-22 23:02:37 +00:00
c28bafcfb6
See previous commits. Also simplify this thing: 2 flags per pool image are enough to avoid a weird central refcount and an associated shared object keeping the refcount. We could even just store these two flags in the mp_image itself (like in mp_image.flags or mp_image.priv), but let's not for the sake of readability.
17 lines
580 B
C
17 lines
580 B
C
#ifndef MPV_MP_IMAGE_POOL_H
|
|
#define MPV_MP_IMAGE_POOL_H
|
|
|
|
struct mp_image_pool;
|
|
|
|
struct mp_image_pool *mp_image_pool_new(int max_count);
|
|
struct mp_image *mp_image_pool_get(struct mp_image_pool *pool, unsigned int fmt,
|
|
int w, int h);
|
|
void mp_image_pool_clear(struct mp_image_pool *pool);
|
|
|
|
struct mp_image *mp_image_pool_new_copy(struct mp_image_pool *pool,
|
|
struct mp_image *img);
|
|
void mp_image_pool_make_writeable(struct mp_image_pool *pool,
|
|
struct mp_image *img);
|
|
|
|
#endif
|