From: Boram Park Date: Thu, 22 Jun 2017 05:33:22 +0000 (+0900) Subject: e_comp: check the buffer minimum size X-Git-Tag: submit/tizen_3.0/20170705.085031~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=196d0fe749fc4b41ecf2334da5fba70a819b0b67;p=platform%2Fupstream%2Fenlightenment.git e_comp: check the buffer minimum size Change-Id: Ic39181c17b1b1d3b3f28424890b4265adca771a0 --- diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index 69e916f923..41d766dc24 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -276,7 +276,7 @@ _hwc_available_get(E_Client *ec) { E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data; E_Output *eout; - int transform = 0; + int transform = 0, minw = 0, minh = 0; if ((!cdata) || (!cdata->buffer_ref.buffer) || @@ -309,6 +309,15 @@ _hwc_available_get(E_Client *ec) * can't show it to HW overlay directly. */ eout = e_output_find(ec->zone->output_id); + EINA_SAFETY_ON_NULL_RETURN_VAL(eout, EINA_FALSE); + + tdm_output_get_available_size(eout->toutput, &minw, &minh, NULL, NULL, NULL); + + if ((minw > 0) && (minw > cdata->buffer_ref.buffer->w)) + return EINA_FALSE; + if ((minh > 0) && (minh > cdata->buffer_ref.buffer->h)) + return EINA_FALSE; + transform = cdata->scaler.buffer_viewport.buffer.transform; if ((eout->config.rotation / 90) != transform) return EINA_FALSE;