[Bug 746147] compositor: Don't convert or aggregate pads that are completely obscured by a higher zorder pad

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Mar 17 16:20:14 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=746147

--- Comment #8 from Nirbheek Chauhan <nirbheek.chauhan at gmail.com> ---
(In reply to Nicolas Dufresne (stormer) from comment #7)
> Review of attachment 299660 [details] [review]:
> 
> ::: gst/compositor/compositor.c
> @@ +301,3 @@
> +static gboolean
> +is_rectangle_obscured (gint x11, gint y11, gint x12, gint y12, gint x21,
> +    gint y21, gint x22, gint y22)
> 
> The naming is cryptic. Grouping the rectangles in a structure would be much
> cleaner. I found that outside of the compositor we tend to use rectangle as
> a point and a size instead of two points. It is not very consistent, fixing
> it would allow create some utility to eventually implement a proper
> rectangle based render. See GstVideoRectangle in gstvideosink.h as an
> example for a structure (we could reuse this one already).

I originally wrote that function as (x,y) + (w x h), then tried
GstVideoRectangle, but the if statement in those cases was harder to decipher
than this one. In addition, all the CLAMP() calls would need to move into the
function in that case, making it even uglier, and less likely that the function
would be inlined by gcc. Now that I think about it, it might actually make
sense to add an inline keyword to the function definition...

It was just personal preference, since the current check is very simple and
obvious at a glance, but I can change it if you feel strongly about it. :)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list