From 486b3ce6f839f59f28b7b3d5add92e397b156f95 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 1 Oct 2016 16:12:03 +0200 Subject: vo_opengl: minor simplification The extra gl_transform_trans() has no apparent use. --- video/out/opengl/video.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'video') diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index c3b3660c78..fa170f61c9 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -732,16 +732,15 @@ static int pass_bind(struct gl_video *p, struct img_tex tex) static void get_transform(float w, float h, int rotate, bool flip, struct gl_transform *out_tr) { - struct gl_transform tr = identity_trans; int a = rotate % 90 ? 0 : rotate / 90; int sin90[4] = {0, 1, 0, -1}; // just to avoid rounding issues etc. int cos90[4] = {1, 0, -1, 0}; - struct gl_transform rot = {{{cos90[a], sin90[a]}, {-sin90[a], cos90[a]}}}; - gl_transform_trans(rot, &tr); + struct gl_transform tr = {{{ cos90[a], sin90[a]}, + {-sin90[a], cos90[a]}}}; // basically, recenter to keep the whole image in view float b[2] = {1, 1}; - gl_transform_vec(rot, &b[0], &b[1]); + gl_transform_vec(tr, &b[0], &b[1]); tr.t[0] += b[0] < 0 ? w : 0; tr.t[1] += b[1] < 0 ? h : 0; -- cgit v1.2.3