From: Seunghun Lee Date: Fri, 4 Dec 2020 03:22:00 +0000 (+0900) Subject: viewport: Restore source area to entire area of buffer X-Git-Tag: submit/tizen/20201206.010849^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F78%2F248978%2F2;p=platform%2Fupstream%2Fenlightenment.git viewport: Restore source area to entire area of buffer Source area has to be restored to entire area of buffer when client requests to unset source area by setting width and height to -1.0 according to what wl_scaler of wayland-extension specification spelled out. This patch fixes it to follow the specification. Change-Id: I0cc48f74e9850a59fca99137d8b5c381ddf53259 --- diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index bd84ce5ab5..d760afa80d 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -425,10 +425,12 @@ e_comp_wl_map_apply(E_Client *ec) e_comp_object_map_update(ec->frame); - vp = &ec->comp_data->scaler.buffer_viewport; - if (vp->buffer.src_width == wl_fixed_from_int(-1)) return; - cdata = ec->comp_data; + vp = &cdata->scaler.buffer_viewport; + if ((vp->buffer.src_width == wl_fixed_from_int(-1)) && + (!cdata->viewport_transform)) + return; + sdata = ec->comp_data->sub.data; if (sdata) { @@ -479,10 +481,20 @@ e_comp_wl_map_apply(E_Client *ec) ec->comp_data->width_from_viewport, ec->comp_data->height_from_viewport); - x1 = wl_fixed_to_int(vp->buffer.src_x); - y1 = wl_fixed_to_int(vp->buffer.src_y); - x2 = wl_fixed_to_int(vp->buffer.src_x + vp->buffer.src_width); - y2 = wl_fixed_to_int(vp->buffer.src_y + vp->buffer.src_height); + if (vp->buffer.src_width == wl_fixed_from_int(-1)) + { + x1 = 0; + y1 = 0; + x2 = cdata->width_from_buffer; + y2 = cdata->height_from_buffer; + } + else + { + x1 = wl_fixed_to_int(vp->buffer.src_x); + y1 = wl_fixed_to_int(vp->buffer.src_y); + x2 = wl_fixed_to_int(vp->buffer.src_x + vp->buffer.src_width); + y2 = wl_fixed_to_int(vp->buffer.src_y + vp->buffer.src_height); + } e_util_transform_texcoord_set(cdata->viewport_transform, 0, x1, y1); e_util_transform_texcoord_set(cdata->viewport_transform, 1, x2, y1);