swapchain_tpl: Modified to unuse buffers list of vk_swapchain_tpl. 43/189143/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Fri, 14 Sep 2018 01:58:04 +0000 (10:58 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Fri, 14 Sep 2018 01:58:04 +0000 (10:58 +0900)
Change-Id: Ifc870a75e6e5b461cb8a0636f188aa88f1d7e504
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/wsi/swapchain_tpl.c

index e0a67ac..a62a256 100644 (file)
@@ -32,7 +32,6 @@ typedef struct vk_swapchain_tpl vk_swapchain_tpl_t;
 struct vk_swapchain_tpl {
        tpl_display_t                   *tpl_display;
        tpl_surface_t                   *tpl_surface;
-       tbm_surface_h                   *buffers;
 };
 
 struct swap_region
@@ -149,8 +148,6 @@ swapchain_tpl_deinit(VkDevice                device,
                if (swapchain_tpl->tpl_display)
                        tpl_object_unreference((tpl_object_t *)swapchain_tpl->tpl_display);
 
-               if (swapchain_tpl->buffers)
-                       free(swapchain_tpl->buffers);
                vk_free(chain->allocator, swapchain_tpl);
        }
 }
@@ -168,10 +165,9 @@ swapchain_tpl_get_buffers(VkDevice                  device,
 
        /* Initialize swapchain buffers. */
        res = tpl_surface_get_swapchain_buffers(swapchain_tpl->tpl_surface,
-                                                                                       &swapchain_tpl->buffers, &buffer_cnt);
+                                                                                       buffers, &buffer_cnt);
        VK_CHECK(res == TPL_ERROR_NONE, goto done, "tpl_surface_get_swapchain_buffers() failed.\n");
 
-       *buffers = swapchain_tpl->buffers;
        *buffer_count = buffer_cnt;
 
 done: