summaryrefslogtreecommitdiff
path: root/cros_gralloc
diff options
context:
space:
mode:
authorYiwei Zhang <zzyiwei@chromium.org>2021-09-15 21:28:51 +0000
committerCommit Bot <commit-bot@chromium.org>2021-09-17 13:47:51 +0000
commit1f9b9000b7b59b24a2c8a160f969e3ebcfed54d0 (patch)
treef17cb834889c8b6699ceb874bd66c18905ec70a0 /cros_gralloc
parent6b13253ab4f51d25613f52bcd9ac9fee36830d81 (diff)
downloadminigbm-1f9b9000b7b59b24a2c8a160f969e3ebcfed54d0.tar.gz
minigbm: completely hide bo->meta from cros_gralloc
This change also stores the final use_flags used for bo allocation into hnd->use_flags. BUG=b:199524294 TEST=build Change-Id: I0f4e3fbeb90acdd3852ede98e0a42620a757cb74 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3163206 Tested-by: Yiwei Zhang <zzyiwei@chromium.org> Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
Diffstat (limited to 'cros_gralloc')
-rw-r--r--cros_gralloc/cros_gralloc_driver.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/cros_gralloc/cros_gralloc_driver.cc b/cros_gralloc/cros_gralloc_driver.cc
index aa53537..4735533 100644
--- a/cros_gralloc/cros_gralloc_driver.cc
+++ b/cros_gralloc/cros_gralloc_driver.cc
@@ -254,15 +254,15 @@ int32_t cros_gralloc_driver::allocate(const struct cros_gralloc_buffer_descripto
hnd->width = drv_bo_get_width(bo);
hnd->height = drv_bo_get_height(bo);
hnd->format = drv_bo_get_format(bo);
- hnd->tiling = bo->meta.tiling;
+ hnd->tiling = drv_bo_get_tiling(bo);
hnd->format_modifier = drv_bo_get_format_modifier(bo);
- hnd->use_flags = descriptor->use_flags;
+ hnd->use_flags = drv_bo_get_use_flags(bo);
bytes_per_pixel = drv_bytes_per_pixel_from_format(hnd->format, 0);
hnd->pixel_stride = DIV_ROUND_UP(hnd->strides[0], bytes_per_pixel);
hnd->magic = cros_gralloc_magic;
hnd->droid_format = descriptor->droid_format;
hnd->usage = descriptor->droid_usage;
- hnd->total_size = descriptor->reserved_region_size + bo->meta.total_size;
+ hnd->total_size = descriptor->reserved_region_size + drv_bo_get_total_size(bo);
hnd->name_offset = handle_data_size;
name = (char *)(&hnd->data[hnd->name_offset]);