From: Changyeon Lee Date: Thu, 11 Jul 2019 06:57:30 +0000 (+0900) Subject: e_hwc_window_queue: add comparing size of client and queue X-Git-Tag: submit/tizen/20190718.064631~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff3d9eb80b4f5ae85280cd4d01581fd372c92bcf;p=platform%2Fupstream%2Fenlightenment.git e_hwc_window_queue: add comparing size of client and queue Change-Id: I28341a45d28fc8825b35fe87445dcde866a044aa --- diff --git a/src/bin/e_hwc_window_queue.c b/src/bin/e_hwc_window_queue.c index fcd77596cc..7d051f5783 100644 --- a/src/bin/e_hwc_window_queue.c +++ b/src/bin/e_hwc_window_queue.c @@ -652,10 +652,25 @@ static Eina_Bool _e_hwc_window_queue_prepare_set(E_Hwc_Window_Queue *queue, E_Hwc_Window *hwc_window) { struct wayland_tbm_client_queue *cqueue = NULL; + E_Client *ec = NULL; if (eina_list_data_find(queue->user_pending_set, hwc_window) == hwc_window) _e_hwc_window_queue_user_pending_set_remove(queue, hwc_window); + ec = hwc_window->ec; + if (!ec) + { + EHWQERR("client is deleted", NULL, queue->hwc, queue); + return EINA_FALSE; + } + + if ((queue->width != ec->w) || (queue->height != ec->h)) + { + EHWQERR("size mismatch queue(%dx%d) client(%dx%d)", + ec, queue->hwc, queue, queue->width, queue->height, ec->w, ec->h); + return EINA_FALSE; + } + cqueue = _user_cqueue_get(hwc_window->ec); if (!cqueue) { @@ -907,6 +922,9 @@ _e_hwc_window_queue_create(tbm_surface_queue_h tqueue) queue); EINA_SAFETY_ON_FALSE_GOTO(tsq_err == TBM_SURFACE_QUEUE_ERROR_NONE, fail); + queue->width = tbm_surface_queue_get_height(tqueue); + queue->height = tbm_surface_queue_get_width(tqueue); + queue->format = tbm_surface_queue_get_format(tqueue); queue->tqueue = tqueue; wl_signal_init(&queue->destroy_signal); diff --git a/src/bin/e_hwc_window_queue.h b/src/bin/e_hwc_window_queue.h index ca7675a20f..005d4e6eea 100644 --- a/src/bin/e_hwc_window_queue.h +++ b/src/bin/e_hwc_window_queue.h @@ -37,6 +37,11 @@ struct _E_Hwc_Window_Queue E_Hwc_Window_Queue_State state; Eina_Bool is_target; + + + int width; + int height; + tbm_format format; }; struct _E_Hwc_Window_Queue_Buffer