does not caching the queue_info 28/104428/1
authorSooChan Lim <sc1.lim@samsung.com>
Tue, 13 Dec 2016 08:47:56 +0000 (17:47 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Tue, 13 Dec 2016 08:47:56 +0000 (17:47 +0900)
A queue_info is created per tbm_surface_queue, not per wl_surface.
Even if a user want to create the tbm_surface_queue with the same wl_surface,
wayland-tbm-client creates the new tbm_surface_queue, the new queue_info
and wl_tbm_queue resource with wl_surface.

p.s. the function below will be removed or will be changed to get
     the wl_tbm_queue from tbm_surface_queue_h, not from wl_surface.

struct wl_tbm_queue *
wayland_tbm_client_get_wl_tbm_queue(struct wayland_tbm_client *tbm_client, struct wl_surface *surface);

Change-Id: If9a7488c51df079047c73a69ea6e1abaa5fa0ba9

src/wayland-tbm-client.c

index 4d5f381..b4e8454 100644 (file)
@@ -993,20 +993,6 @@ wayland_tbm_client_create_surface_queue(struct wayland_tbm_client *tbm_client,
        WL_TBM_RETURN_VAL_IF_FAIL(tbm_client != NULL, NULL);
        WL_TBM_RETURN_VAL_IF_FAIL(surface != NULL, NULL);
 
-       /*
-        * find the queue_info associated with the wl_surface.
-        * client gets only one queue_info per a wl_surface.
-        */
-       queue_info = _wayland_tbm_client_find_queue_info_wl_surface(tbm_client,
-                                                               surface);
-       if (queue_info) {
-#ifdef DEBUG_TRACE
-               WL_TBM_TRACE(" wl_surface(%p) already get a tbm_surface_queue.\n",
-                               surface);
-#endif
-               return queue_info->tbm_queue;
-       }
-
        queue_info = calloc(1, sizeof(struct wayland_tbm_surface_queue));
        WL_TBM_RETURN_VAL_IF_FAIL(queue_info != NULL, NULL);