mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
gl/viv-fb: fix wrong pos (x,y) calculate in queue_resize
queue_resize viewport coordinate calculate is wrong and force queue_resize when do _set_render_rectangle in case user input pos changed https://bugzilla.gnome.org/show_bug.cgi?id=787394
This commit is contained in:
parent
4fa5c37878
commit
8ef4a7ddaf
1 changed files with 5 additions and 5 deletions
|
@ -179,9 +179,7 @@ draw_cb (gpointer data)
|
||||||
|
|
||||||
gl->GetIntegerv (GL_VIEWPORT, viewport_dim);
|
gl->GetIntegerv (GL_VIEWPORT, viewport_dim);
|
||||||
viewport_dim[0] += window_egl->render_rectangle.x;
|
viewport_dim[0] += window_egl->render_rectangle.x;
|
||||||
viewport_dim[1] -= window_egl->render_rectangle.y;
|
viewport_dim[1] += window_egl->render_rectangle.y;
|
||||||
viewport_dim[2] -= window_egl->render_rectangle.x;
|
|
||||||
viewport_dim[3] -= window_egl->render_rectangle.y;
|
|
||||||
gl->Viewport (viewport_dim[0],
|
gl->Viewport (viewport_dim[0],
|
||||||
viewport_dim[1], viewport_dim[2], viewport_dim[3]);
|
viewport_dim[1], viewport_dim[2], viewport_dim[3]);
|
||||||
}
|
}
|
||||||
|
@ -220,13 +218,15 @@ static void
|
||||||
_set_render_rectangle (gpointer data)
|
_set_render_rectangle (gpointer data)
|
||||||
{
|
{
|
||||||
SetRenderRectangleData *render = data;
|
SetRenderRectangleData *render = data;
|
||||||
|
GstGLWindow *window = GST_GL_WINDOW (render->window_egl);
|
||||||
|
|
||||||
GST_LOG_OBJECT (render->window_egl, "setting render rectangle %i,%i+%ix%i",
|
GST_LOG_OBJECT (render->window_egl, "setting render rectangle %i,%i+%ix%i",
|
||||||
render->rect.x, render->rect.y, render->rect.w, render->rect.h);
|
render->rect.x, render->rect.y, render->rect.w, render->rect.h);
|
||||||
|
|
||||||
render->window_egl->render_rectangle = render->rect;
|
render->window_egl->render_rectangle = render->rect;
|
||||||
gst_gl_window_resize (GST_GL_WINDOW (render->window_egl), render->rect.w,
|
gst_gl_window_resize (window, render->rect.w, render->rect.h);
|
||||||
render->rect.h);
|
|
||||||
|
window->queue_resize = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
Loading…
Reference in a new issue