va: display: Optimize out some property indirection
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 18 Dec 2024 18:35:53 +0000 (13:35 -0500)
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>
Thu, 19 Dec 2024 10:13:27 +0000 (10:13 +0000)
Because it was visible during some profiling, I thought it cost nothing
to optimize out the uneeded property get roundtrip.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8181>

subprojects/gst-plugins-bad/gst-libs/gst/va/gstvadisplay.c

index e3f2f1174dae511c0821ba7f9ff69b335bb35a3a..1a32e3b9c67706005628dfa979c0c279a7857468 100644 (file)
@@ -425,12 +425,12 @@ gst_va_display_initialize (GstVaDisplay * self)
 gpointer
 gst_va_display_get_va_dpy (GstVaDisplay * self)
 {
-  VADisplay dpy;
+  GstVaDisplayPrivate *priv;
 
   g_return_val_if_fail (GST_IS_VA_DISPLAY (self), NULL);
+  priv = GET_PRIV (self);
 
-  g_object_get (self, "va-display", &dpy, NULL);
-  return dpy;
+  return priv->display;
 }
 
 /**