ivi-shell: Set view mask solely based on source rectangle

The controller sets the source and destination rectangles for any surface,
based on these parameters configure event is sent from the client application.

The controller commit the properties in the initial time, so
the view mask is capped to the current buffer dimensions of the
client. In runtime the client maybe sends some the bigger
configures of buffers. In this case view mask will be of smaller
dimension compared to the client buffer and it results in un-desired
clipping of client buffer.

To resolve this, use source rectangle as view mask. weston will take
care to clip the boundingbox of view to client buffer dimension if the
view mask is smaller.

Signed-off-by: Harsha M M <harsha.manjulamallikarjun@in.bosch.com>
This commit is contained in:
Harsha M M 2020-04-14 15:54:18 +05:30 committed by Marius Vlad
parent 166ef1ad66
commit 2e39630214

View file

@ -488,10 +488,6 @@ calc_surface_to_global_matrix_and_mask_to_weston_surface(
const struct ivi_layout_surface_properties *sp = &ivisurf->prop;
const struct ivi_layout_layer_properties *lp = &ivilayer->prop;
struct weston_output *output = iviscrn->output;
struct ivi_rectangle weston_surface_rect = { 0,
0,
ivisurf->surface->width,
ivisurf->surface->height };
struct ivi_rectangle surface_source_rect = { sp->source_x,
sp->source_y,
sp->source_width,
@ -517,7 +513,6 @@ calc_surface_to_global_matrix_and_mask_to_weston_surface(
lp->dest_y + output->y,
lp->dest_width,
lp->dest_height };
struct ivi_rectangle surface_result;
struct ivi_rectangle layer_dest_rect_in_global_intersected;
/*
@ -534,12 +529,6 @@ calc_surface_to_global_matrix_and_mask_to_weston_surface(
weston_matrix_translate(m, output->x, output->y, 0.0f);
/* this intersected ivi_rectangle would be used for masking
* weston_surface
*/
ivi_rectangle_intersect(&surface_source_rect, &weston_surface_rect,
&surface_result);
/*
* destination rectangle of layer in multi screens coordinate
* is intersected to avoid displaying outside of an assigned screen.
@ -550,7 +539,7 @@ calc_surface_to_global_matrix_and_mask_to_weston_surface(
/* calc masking area of weston_surface from m */
calc_inverse_matrix_transform(m,
&layer_dest_rect_in_global_intersected,
&surface_result,
&surface_source_rect,
result);
}