[PATCH weston v3 07/17] compositor: refactor into convert_size_by_transform_scale()

Pekka Paalanen ppaalanen at gmail.com
Fri May 6 11:43:40 UTC 2016

On Wed, 4 May 2016 17:45:33 -0700
Bryce Harrington <bryce at osg.samsung.com> wrote:

> On Tue, Apr 26, 2016 at 03:50:59PM +0300, Pekka Paalanen wrote:
> > From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> > 
> > There were two copies of code applying transform and scale to size.
> > Refactor the code to use just one copy in a new function.
> > 
> > Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>  
> Nice refactoring.  I would probably use error returns rather than
> asserts, but that's probably down to personal preference and anyway I'm
> not sure how the error situation should be handled better than
> termination.  Presumably invalid scale and transforms never happen in
> practice anyway, so assert may be the better choice.

Yes, at this point in code, if scale or transform are invalid, it is an
internal bug in weston. Old code would have gladly divided by zero.

> Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
> Weston patches 6 and 7 would be fine to land now pre-beta; they don't
> depend on the protocol changes and are straightforward refactors.

Both pushed:
   2f78301..59987fa  master -> master

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160506/77f676c0/attachment.sig>

More information about the wayland-devel mailing list