From 5de271fe6c0f909006141ea26a7b94c1102be31d Mon Sep 17 00:00:00 2001 From: Mattijs Korpershoek Date: Tue, 28 Feb 2023 16:17:13 +0100 Subject: android: mm: generic: Use GraphicBufferAllocator instead of gralloc.h gralloc.h is a very old API that has been deprecated at least since Android P (9). Switch over to a higher level abstraction of gralloc from libui, which is compatible with Android 11 and up. Libui: * is provided in the VNDK (so it's available to vendors). * is also used in the camera vts test named VtsAidlHalCameraProvider_TargetTest. Notes: * GraphicsBufferAllocator being a Singleton, buffer lifecycle management is easier. * The imported headers from Android generate the -Wextra-semi warning. To avoid patching the files, a pragma has been added before inclusion. * libdl was used for dlclosing() the legacy hal, so the dep has been dropped Signed-off-by: Mattijs Korpershoek --- subprojects/packagefiles/vndk/meson.build | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'subprojects/packagefiles/vndk') diff --git a/subprojects/packagefiles/vndk/meson.build b/subprojects/packagefiles/vndk/meson.build index b5999f16..dbc7eda6 100644 --- a/subprojects/packagefiles/vndk/meson.build +++ b/subprojects/packagefiles/vndk/meson.build @@ -21,3 +21,24 @@ libhardware_dep = declare_dependency( dependencies : cxx.find_library('hardware', dirs : prebuild_libraries), include_directories : include_directories(include_base / 'hardware/libhardware/')) meson.override_dependency('libhardware', libhardware_dep) + +liblog_dep = declare_dependency( + dependencies : cxx.find_library('log', dirs : prebuild_libraries), + include_directories : include_directories(include_base / 'system/logging/liblog/include_vndk')) +meson.override_dependency('liblog', liblog_dep) + +libutils_dep = declare_dependency( + dependencies : [ + cxx.find_library('utils', dirs : prebuild_libraries), + liblog_dep, + ], + include_directories : include_directories(include_base / 'system/core/libutils/include')) +meson.override_dependency('libutils', libutils_dep) + +libui_dep = declare_dependency( + dependencies : [ + cxx.find_library('ui', dirs : prebuild_libraries), + libutils_dep, + ], + include_directories : include_directories(include_base / 'frameworks/native/libs/ui/include_vndk')) +meson.override_dependency('libui', libui_dep) -- cgit v1.2.1