[PATCH weston 03/11] compositor: Change "touched" to bool

Derek Foreman derekf at osg.samsung.com
Wed Nov 18 14:32:26 PST 2015


Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---
 src/compositor.c   | 4 ++--
 src/compositor.h   | 2 +-
 src/rpi-renderer.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index f8437e8..67be07d 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -2044,12 +2044,12 @@ compositor_accumulate_damage(struct weston_compositor *ec)
 	pixman_region32_fini(&clip);
 
 	wl_list_for_each(ev, &ec->view_list, link)
-		ev->surface->touched = 0;
+		ev->surface->touched = false;
 
 	wl_list_for_each(ev, &ec->view_list, link) {
 		if (ev->surface->touched)
 			continue;
-		ev->surface->touched = 1;
+		ev->surface->touched = true;
 
 		surface_flush_damage(ev->surface);
 
diff --git a/src/compositor.h b/src/compositor.h
index f3e0075..fa9c4fd 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -943,7 +943,7 @@ struct weston_surface {
 	/* Not for long-term storage.  This exists for book-keeping while
 	 * iterating over surfaces and views
 	 */
-	int32_t touched;
+	bool touched;
 
 	void *renderer_state;
 
diff --git a/src/rpi-renderer.c b/src/rpi-renderer.c
index 76e1ddf..33eb67c 100644
--- a/src/rpi-renderer.c
+++ b/src/rpi-renderer.c
@@ -1347,13 +1347,13 @@ rpi_renderer_repaint_output(struct weston_output *base,
 
 	/* Swap resources on surfaces as needed */
 	wl_list_for_each_reverse(wv, &compositor->view_list, link)
-		wv->surface->touched = 0;
+		wv->surface->touched = false;
 
 	wl_list_for_each_reverse(wv, &compositor->view_list, link) {
 		view = to_rpir_view(wv);
 
 		if (!wv->surface->touched) {
-			wv->surface->touched = 1;
+			wv->surface->touched = true;
 
 			if (view->surface->buffer_type == BUFFER_TYPE_EGL ||
 			    view->surface->need_swap)
-- 
2.6.2



More information about the wayland-devel mailing list