summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMart Raudsepp <mart@leio.tech>2020-11-26 14:45:05 +0200
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2020-12-04 17:29:24 +0000
commit0854d168e99c53bf8fcaae4228aa2070a28d2c70 (patch)
tree36a87c38b06e98711e88ee2d7680601aac0c58d4
parent630e1e78b75722af0519361c414179149b740933 (diff)
downloadgstreamer-plugins-base-0854d168e99c53bf8fcaae4228aa2070a28d2c70.tar.gz
gl/eagl: Fix resize condition check in draw_cb to not get called unnecessarily
A CGSize contains CGFloat values (a typedef to double or float), which means that the values aren't equal, despite it being equal after they are cast to int by assigning them to window_height/width private members. This leads to excessive gst_gl_window_resize calls on each frame, at least if the CGFloat value has a .5 decimal value, e.g. 103.5. Fix it by storing them as CGFloat instead of gint. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/960>
-rw-r--r--gst-libs/gst/gl/eagl/gstglwindow_eagl.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst-libs/gst/gl/eagl/gstglwindow_eagl.m b/gst-libs/gst/gl/eagl/gstglwindow_eagl.m
index c18486a77..b7364be07 100644
--- a/gst-libs/gst/gl/eagl/gstglwindow_eagl.m
+++ b/gst-libs/gst/gl/eagl/gstglwindow_eagl.m
@@ -57,7 +57,7 @@ struct _GstGLWindowEaglPrivate
gpointer external_view;
gpointer internal_view;
gpointer layer;
- gint window_width, window_height;
+ CGFloat window_width, window_height;
gint preferred_width, preferred_height;
gpointer gl_queue;
GMutex draw_lock;