summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/hwdec_rpi.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-07 19:14:18 +0200
committerwm4 <wm4@nowhere>2017-08-07 19:17:28 +0200
commit47ea771b7a29b04e35276d38733f72970b4dd448 (patch)
tree2a9f9c52acba9f662d62a290f739c502c6ca0ff8 /video/out/opengl/hwdec_rpi.c
parent1adf324d8b1261abfc02d905f98055991b29ac11 (diff)
downloadmpv-47ea771b7a29b04e35276d38733f72970b4dd448.tar.bz2
mpv-47ea771b7a29b04e35276d38733f72970b4dd448.tar.xz
vo_opengl: further GL API use separation
Move multiple GL-specific things from the renderer to other places like vo_opengl.c, vo_opengl_cb.c, and ra_gl.c. The vp_w/vp_h parameters to gl_video_resize() make no sense anymore, and are implicitly part of struct fbodst. Checking the main framebuffer depth is moved to vo_opengl.c. For vo_opengl_cb.c it always assumes 8. The API user now has to override this manually. The previous heuristic didn't make much sense anyway. The only remaining dependency on GL is the hwdec stuff, which is harder to change.
Diffstat (limited to 'video/out/opengl/hwdec_rpi.c')
-rw-r--r--video/out/opengl/hwdec_rpi.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/video/out/opengl/hwdec_rpi.c b/video/out/opengl/hwdec_rpi.c
index 8611217c79..e8feb714fa 100644
--- a/video/out/opengl/hwdec_rpi.c
+++ b/video/out/opengl/hwdec_rpi.c
@@ -50,7 +50,6 @@ struct priv {
struct mp_image *current_frame;
- int w, h;
struct mp_rect src, dst;
int cur_window[4]; // raw user params
};
@@ -131,9 +130,6 @@ static void update_overlay(struct gl_hwdec *hw, bool check_window_only)
struct mp_rect src = p->src;
struct mp_rect dst = p->dst;
- if (!p->w || !p->h)
- return;
-
int defs[4] = {0, 0, 0, 0};
int *z = mpgl_get_native_display(gl, "MPV_RPI_WINDOW");
if (!z)
@@ -248,13 +244,11 @@ static int enable_renderer(struct gl_hwdec *hw)
return 0;
}
-static void overlay_adjust(struct gl_hwdec *hw, int w, int h,
+static void overlay_adjust(struct gl_hwdec *hw,
struct mp_rect *src, struct mp_rect *dst)
{
struct priv *p = hw->priv;
- p->w = w;
- p->h = h;
p->src = *src;
p->dst = *dst;