[PATCH weston 5/8] compositor-drm: Take a reference to the drm_output's base where it makes sense

Pekka Paalanen ppaalanen at gmail.com
Tue Jan 31 13:28:37 UTC 2017


On Mon,  2 May 2016 22:40:14 +0100
Emmanuel Gil Peyrot <emmanuel.peyrot at collabora.com> wrote:

> This makes the code more uniform with the functions taking a
> weston_output* as argument, and reduces the churn of the following
> commits.
> 
> Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot at collabora.com>
> ---
>  src/compositor-drm.c | 130 ++++++++++++++++++++++++++-------------------------
>  1 file changed, 67 insertions(+), 63 deletions(-)

Hi,

this seems it would go exactly in the opposite direction of
https://cgit.freedesktop.org/wayland/weston/commit/src/compositor-drm.c?id=050c1ba7290e017358cbe5f7971f8f0ead3afbcd
which explains my preference and rationale.

I'm also not quite sure this actually reduces churn much for the clone
mode patch.

> @@ -635,7 +636,7 @@ drm_output_repaint(struct weston_output *output_base,
>  {
>  	struct drm_output *output = (struct drm_output *) output_base;

I wonder, if one uses both 'output_base' and 'output->base' here
or in called (inlined) functions, is there a danger of violating strict
aliasing rules?

I suppose we don't compile libweston with optimizations that would
break from that, but I'd find it maybe easier to stick with one form.
Particularly when 'output_base->' does not really save line length
compared to       'output->base.'.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170131/54636a36/attachment.sig>


More information about the wayland-devel mailing list