GNOME Bugzilla – Bug 748748
compositor: only paint background if actually needed
Last modified: 2018-11-03 13:34:51 UTC
+++ This bug was initially created as a clone of Bug #746147 +++ Subject says it all.
Created attachment 303298 [details] [review] Compositor: Skip unnecessary background fill Hello all, As Tim-Philipp commented the patch could re-use the just-introduced is_rectangle_contained() function. This new version do it. > I wonder if we could do this as part of the previous loop or if that would be > too messy. Maybe the decision if background is necessary or not could be taken into prepare_frame(), but I do not know if it will be any performance benefits and I think right now it is more clear. Pablo.
I think this does have performance benefits, I was just looking at a case where painting the background unnecessarily was line #2 in perf top, and taking up significant cpu power. If I read your patch correctly, this covers the case of one input filling out the entire output, which I guess makes sense if compositor is used for picture-in-picture or logo overlay or such. Any ideas how we could easily detect the case of a matrix/arrangement of input streams filling the complete output frame? (Easy case: N*M matrix, Harder case: e.g. one big picture with a row of little ones at the bottom)
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/247.