Fix tiled format issue. 65/207365/2
authorXuelian Bai <xuelian.bai@samsung.com>
Tue, 4 Jun 2019 11:57:32 +0000 (19:57 +0800)
committerXuelian Bai <xuelian.bai@samsung.com>
Tue, 4 Jun 2019 14:32:10 +0000 (22:32 +0800)
When flags are not tiled, don't call bufmgr_alloc_bo_with_tiled.
Or, performance down will happen.

Change-Id: Ib15094db7a1d614772f9c161549aa3b63f69d738
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
src/tbm_surface_internal.c

index db42c4e..dc29a5e 100644 (file)
@@ -860,7 +860,7 @@ tbm_surface_internal_create_with_flags(int width, int height,
 
                                surf->bos[i] = bo;
                                /* LCOV_EXCL_STOP */
-                       } else if (bufmgr->bufmgr_func->bufmgr_alloc_bo_with_tiled_format) {
+                       } else if (bufmgr->bufmgr_func->bufmgr_alloc_bo_with_tiled_format && (flags & TBM_BO_TILED)) {
                                bo = calloc(1, sizeof(struct _tbm_bo));
                                if (!bo) {
                                        TBM_ERR("fail to alloc bo struct\n");