[PATCH weston 1/2] ivi-shell: pass only ivi_view to update_prop

Ucan, Emre (ADITG/SW1) eucan at de.adit-jv.com
Mon Jan 30 13:36:05 UTC 2017


We can get ivisurf, ivilayer and iviscreen
easily from ivi_view. Then, we do not need
to check, if ivi_view's layer is the same
as the given ivilayer.

Signed-off-by: Emre Ucan <eucan at de.adit-jv.com>
---
 ivi-shell/ivi-layout.c |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 2b21833..6c13fee 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -612,18 +612,14 @@ calc_surface_to_global_matrix_and_mask_to_weston_surface(
 }
 
 static void
-update_prop(struct ivi_layout_screen  *iviscrn,
-	    struct ivi_layout_layer *ivilayer,
-	    struct ivi_layout_view *ivi_view)
+update_prop(struct ivi_layout_view *ivi_view)
 {
-	struct ivi_layout_surface *ivisurf;
+	struct ivi_layout_surface *ivisurf = ivi_view->ivisurf;
+	struct ivi_layout_layer *ivilayer = ivi_view->on_layer;
+	struct ivi_layout_screen *iviscrn = ivilayer->on_screen;
 	struct ivi_rectangle r;
 	bool can_calc = true;
 
-	assert(ivi_view->on_layer == ivilayer);
-
-	ivisurf = ivi_view->ivisurf;
-
 	/*In case of no prop change, this just returns*/
 	if (!ivilayer->prop.event_mask && !ivisurf->prop.event_mask)
 		return;
@@ -685,7 +681,7 @@ commit_changes(struct ivi_layout *layout)
 				if (ivi_view->ivisurf->prop.visibility == false)
 					continue;
 
-				update_prop(iviscrn, ivilayer, ivi_view);
+				update_prop(ivi_view);
 			}
 		}
 	}
-- 
1.7.9.5



More information about the wayland-devel mailing list