compositor-wayland: fix shm_buffer damage init
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 24 Oct 2017 07:28:43 +0000 (10:28 +0300)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 24 Oct 2017 09:51:35 +0000 (12:51 +0300)
commit323d4b37a09ae5c8800b390ab88a3b714aa21655
treec7d02a0a36ac2d481c08e7ccb1aebd5afe850494
parent2b3c97d560a8a60d6029be9795e81712e0868307
compositor-wayland: fix shm_buffer damage init

It appears that wayland_shm_buffer::damage is in the global coordinate
space. Therefore initializing it to width x height at 0,0 is not correct
for any output not positioned at 0,0. That is, all outputs after the
first one get it wrong.

Initialize it from the output region, which is in the global coordinate
space.

While at it, add a comment to note that damage is in global coordinate
space. As I can see, this was the last confusion about it.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Acked-by: Daniel Stone <daniels@collabora.com>
libweston/compositor-wayland.c