Re: [PATCH v14 30/41] compositor-drm: Don't need safe view-list traversal

2018-01-26 Thread Pekka Paalanen
On Wed, 20 Dec 2017 12:26:47 +
Daniel Stone  wrote:

> Nothing in this loop reorders views within the compositor's view_list.
> 
> Signed-off-by: Daniel Stone 
> ---
>  libweston/compositor-drm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
> index b030234e4..19aeb5326 100644
> --- a/libweston/compositor-drm.c
> +++ b/libweston/compositor-drm.c
> @@ -3058,7 +3058,7 @@ drm_assign_planes(struct weston_output *output_base, 
> void *repaint_data)
>   struct drm_output *output = to_drm_output(output_base);
>   struct drm_output_state *state;
>   struct drm_plane_state *plane_state;
> - struct weston_view *ev, *next;
> + struct weston_view *ev;
>   pixman_region32_t overlap, surface_overlap;
>   struct weston_plane *primary, *next_plane;
>  
> @@ -3083,7 +3083,7 @@ drm_assign_planes(struct weston_output *output_base, 
> void *repaint_data)
>   pixman_region32_init(&overlap);
>   primary = &output_base->compositor->primary_plane;
>  
> - wl_list_for_each_safe(ev, next, &output_base->compositor->view_list, 
> link) {
> + wl_list_for_each(ev, &output_base->compositor->view_list, link) {
>   struct weston_surface *es = ev->surface;
>  
>   /* Test whether this buffer can ever go into a plane:

Reviewed-by: Pekka Paalanen 


Thanks,
pq


pgpSHQJLkpoCe.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCH v14 30/41] compositor-drm: Don't need safe view-list traversal

2017-12-20 Thread Daniel Stone
Nothing in this loop reorders views within the compositor's view_list.

Signed-off-by: Daniel Stone 
---
 libweston/compositor-drm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index b030234e4..19aeb5326 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -3058,7 +3058,7 @@ drm_assign_planes(struct weston_output *output_base, void 
*repaint_data)
struct drm_output *output = to_drm_output(output_base);
struct drm_output_state *state;
struct drm_plane_state *plane_state;
-   struct weston_view *ev, *next;
+   struct weston_view *ev;
pixman_region32_t overlap, surface_overlap;
struct weston_plane *primary, *next_plane;
 
@@ -3083,7 +3083,7 @@ drm_assign_planes(struct weston_output *output_base, void 
*repaint_data)
pixman_region32_init(&overlap);
primary = &output_base->compositor->primary_plane;
 
-   wl_list_for_each_safe(ev, next, &output_base->compositor->view_list, 
link) {
+   wl_list_for_each(ev, &output_base->compositor->view_list, link) {
struct weston_surface *es = ev->surface;
 
/* Test whether this buffer can ever go into a plane:
-- 
2.14.3

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel