summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2023-04-17 21:34:19 +0900
committerSeungha Yang <seungha@centricular.com>2023-04-21 17:27:49 +0000
commit0d9f08ce9a201b227b172e294085cb2c887d3081 (patch)
tree55d987669541dcc9d66eae33450e81258a3658ae
parent917424b3fbc18d8455485cd9d8c1acd49280af37 (diff)
downloadgstreamer-0d9f08ce9a201b227b172e294085cb2c887d3081.tar.gz
d3d11compositor: Skip zero alpha input
Blending such input is a waste of resource since nothing will be rendered Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4456>
-rw-r--r--subprojects/gst-plugins-bad/sys/d3d11/gstd3d11compositor.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11compositor.cpp b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11compositor.cpp
index d777aaaf7c..80a0a957e3 100644
--- a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11compositor.cpp
+++ b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11compositor.cpp
@@ -766,6 +766,9 @@ gst_d3d11_compositor_pad_check_frame_obscured (GstVideoAggregatorPad * pad,
* left unscaled)
*/
+ if (cpad->alpha == 0)
+ return TRUE;
+
gst_d3d11_compositor_pad_get_output_size (cpad, GST_VIDEO_INFO_PAR_N (info),
GST_VIDEO_INFO_PAR_D (info), &width, &height, &x_offset, &y_offset);