diff options
author | wm4 <wm4@nowhere> | 2017-08-05 13:48:46 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-08-05 13:48:46 +0200 |
commit | f72a33d2cb223df921967cfe7ae203f882ba6921 (patch) | |
tree | 3571ef752f95e42488bc80de5343d2287a94cbdb /video/out/opengl/video.c | |
parent | dd096863fa00f1c0c9268932a46ddc321122f552 (diff) | |
download | mpv-f72a33d2cb223df921967cfe7ae203f882ba6921.tar.bz2 mpv-f72a33d2cb223df921967cfe7ae203f882ba6921.tar.xz |
vo_opengl: organize ra PBO flag slightly differently
Instead of having a mutable ra_tex field (and the only one), move the
flag to struct ra, since we have only 2 tex_upload user calls anyway,
and both want the same PBO behavior. (At first I considered making it
a RA_TEX_UPLOAD_ flag, but why bother. PBOs are a terribly GL-specific
thing, so we can't expect a reasonable abstraction of it anyway.)
Diffstat (limited to 'video/out/opengl/video.c')
-rw-r--r-- | video/out/opengl/video.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index 3442e9fb59..b9d91936e7 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -505,10 +505,8 @@ static void reinit_osd(struct gl_video *p) { mpgl_osd_destroy(p->osd); p->osd = NULL; - if (p->osd_state) { + if (p->osd_state) p->osd = mpgl_osd_init(p->ra, p->log, p->osd_state); - mpgl_osd_set_options(p->osd, p->opts.pbo); - } } static void uninit_rendering(struct gl_video *p) @@ -3320,9 +3318,6 @@ static bool pass_upload_image(struct gl_video *p, struct mp_image *mpi, uint64_t plane->flipped = mpi->stride[0] < 0; - // (It's unclear whether this should be changeable on the fly.) - plane->tex->use_pbo = p->opts.pbo; - struct dr_buffer *mapped = gl_find_dr_buffer(p, mpi->planes[n]); p->ra->fns->tex_upload(p->ra, plane->tex, mpi->planes[n], @@ -3709,6 +3704,7 @@ static void reinit_from_options(struct gl_video *p) check_gl_features(p); uninit_rendering(p); gl_sc_set_cache_dir(p->sc, p->global, p->opts.shader_cache_dir); + p->ra->use_pbo = p->opts.pbo; gl_video_setup_hooks(p); reinit_osd(p); |