[PATCH] ivi-layout: Initialize surface source rectange to 1x1

Potrola, MateuszX mateuszx.potrola at intel.com
Wed May 18 10:59:32 UTC 2016


> > ivi-shell/ivi-layout.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index
> > 1601787..ef7ee02 100644
> > --- a/ivi-shell/ivi-layout.c
> > +++ b/ivi-shell/ivi-layout.c
> > @@ -250,6 +250,9 @@ init_surface_properties(struct
> ivi_layout_surface_properties *prop)
> > 	 */
> > 	prop->dest_width = 1;
> > 	prop->dest_height = 1;
> > +
> > +	prop->source_width = 1;
> > +	prop->source_height = 1;
> > }
> 
> Minor nit: I wouldn't use a blank line there.
> Should there be a condition around this to only set the source width/height to 1
> if they're both 0?

At the beginning of init_surface_properties all fields of prop are initialized to 0 using memset(prop, 0, sizeof *prop), so there is no need for additional condition.

Regards,
Mateusz


Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928



More information about the wayland-devel mailing list