summaryrefslogtreecommitdiffstats
path: root/video/out/vo_gpu.c
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-09-20 10:45:33 +0200
committerNiklas Haas <git@haasn.xyz>2017-09-22 16:58:55 +0200
commit62ddc85d178e647e8cfbee6da4d173c661b4f1fc (patch)
treeab58cbd56fe8a6251ada92f7b75e002e52e0d430 /video/out/vo_gpu.c
parent2af2fa7a27586f6938f4db8f45e316212e18e442 (diff)
downloadmpv-62ddc85d178e647e8cfbee6da4d173c661b4f1fc.tar.bz2
mpv-62ddc85d178e647e8cfbee6da4d173c661b4f1fc.tar.xz
vo_gpu: simplify structs / names
Due to the plethora of historical baggage from different eras getting confusing, I decided to simplify and unify the struct organization and naming scheme. Structs that got renamed: 1. fbodst -> ra_fbo (and moved to gpu/context.h) 2. fbotex -> removed (redundant after 2af2fa7a) 3. fbosurface -> surface 4. img_tex -> image In addition to these structs being renamed, all of the names have been made consistent. The new scheme is as follows: struct image img; struct ra_tex *tex; struct ra_fbo fbo; This also affects derived names, e.g. indirect_fbo -> indirect_tex. Notably also, finish_pass_fbo -> finish_pass_tex and finish_pass_direct -> finish_pass_fbo. The new equivalent of fbotex_change() is called ra_tex_resize(). This commit (should) contain no logic changes, just renaming a bunch of crap.
Diffstat (limited to 'video/out/vo_gpu.c')
-rw-r--r--video/out/vo_gpu.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/video/out/vo_gpu.c b/video/out/vo_gpu.c
index 8a5e46bea0..bd245de05b 100644
--- a/video/out/vo_gpu.c
+++ b/video/out/vo_gpu.c
@@ -77,18 +77,11 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame)
struct gpu_priv *p = vo->priv;
struct ra_swapchain *sw = p->ctx->swapchain;
- struct ra_tex *tex = sw->fns->start_frame(sw);
- if (!tex) {
- MP_ERR(vo, "Failed starting frame!\n");
+ struct ra_fbo fbo;
+ if (!sw->fns->start_frame(sw, &fbo))
return;
- }
-
- struct fbodst dst = {
- .tex = tex,
- .flip = sw->flip_v,
- };
- gl_video_render_frame(p->renderer, frame, dst);
+ gl_video_render_frame(p->renderer, frame, fbo);
if (!sw->fns->submit_frame(sw, frame)) {
MP_ERR(vo, "Failed presenting frame!\n");
return;