From 8da39de9889e61b26af32f6afbd710fdc4aa32a0 Mon Sep 17 00:00:00 2001 From: "Yang, Dong" Date: Fri, 28 May 2021 07:08:59 +0800 Subject: [PATCH] getBackingStore() return unique value getBackingStore() should return a globally unique value for a dedicated graphics buffer, the graphics buffers will share between different modules like display and codec, the unique value will be used to identify specifi memory. Tracked-On: OAM-97062 Signed-off-by: Yang, Dong --- cros_gralloc/cros_gralloc_driver.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/cros_gralloc/cros_gralloc_driver.cc b/cros_gralloc/cros_gralloc_driver.cc index 7581fb6..9af64a7 100644 --- a/cros_gralloc/cros_gralloc_driver.cc +++ b/cros_gralloc/cros_gralloc_driver.cc @@ -325,13 +325,7 @@ int32_t cros_gralloc_driver::get_backing_store(buffer_handle_t handle, uint64_t return -EINVAL; } - auto buffer = get_buffer(hnd); - if (!buffer) { - cros_gralloc_error("Invalid Reference."); - return -EINVAL; - } - - *out_store = static_cast(buffer->get_id()); + *out_store = static_cast(hnd->id); return 0; }