diff options
author | Mattijs Korpershoek <mkorpershoek@baylibre.com> | 2023-08-24 14:28:32 +0200 |
---|---|---|
committer | Mattijs Korpershoek <mkorpershoek@baylibre.com> | 2023-09-23 17:30:37 +0200 |
commit | 0afa6ee1075a625940a69c51ec708b64e6d1f113 (patch) | |
tree | 14d7c74f831e2ccd3157da13cd60e0ccc86878ee /src/android/jpeg/thumbnailer.cpp | |
parent | 1d616141420d1f51e5999d758e3e0cc721a46290 (diff) |
android: switch over to modern gralloc API via libui
gralloc.h is a very old API that has been deprecated at least since
Android P (9).
Devices are encouraged to switch over to HIDL interface named
android.hardware.graphics.allocator@<VERSION>, where <VERSION> can be
2.0 ,3.0 or 4.0.
This is mandatory since Android Q (10) [1]
Fortunately, Android provides an abstraction on top of
android.hardware.graphics.allocator which is compatible with each
version.
This abstraction is implemented in libui, which is available in the
VNDK.
Import all necessary headers from AOSP and switch over the
generic_frame_buffer_allocator to use GraphicBufferAllocator.
This series has been build-tested on a linux host and functionally
tested on an AM62x SK EVM with Android 13. (preview and capture).
[1] https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/main/compatibility_matrices/compatibility_matrix.4.xml#195
To: libcamera-devel@lists.libcamera.org
Cc: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Cc: Guillaume La Roque <glaroque@baylibre.com>
Cc: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
---
Changes in v4:
- EDITME: describe what is new in this series revision.
- EDITME: use bulletpoints and terse descriptions.
- Link to v3: https://lore.kernel.org/r/20230923-gralloc-api-v4-v3-0-9a9e039284ba@baylibre.com
Changes in v3:
- Fixed patch 3 missing whitespace (Jacopo)
- Added libui meson import build in patch 3 (more consistent) (Jacopo)
- Removed member reference to GraphicBufferAllocator in patch 4 (Jacopo)
- Link to v2: https://lists.libcamera.org/pipermail/libcamera-devel/2023-September/038942.html
Changes in v2:
- Dropped additional ; in graphic_buffer_allocator_stub.cpp. (Kieran)
- Surrounded problematic includes with #pragma to avoid clang compile
errors related to -Wextra-semi. (Kieran)
- Link to v1: https://lists.libcamera.org/pipermail/libcamera-devel/2023-September/038927.html
Tested on linux with:
CC=clang CXX=clang++ meson setup build -Dandroid=enabled -Dandroid_platform=generic
ninja -C build
And clang version clang++ (clang 16.0.6 "clang version 16.0.6 (Fedora 16.0.6-2.fc38)")
--- b4-submit-tracking ---
# This section is used internally by b4 prep for tracking purposes.
{
"series": {
"revision": 4,
"change-id": "20230824-gralloc-api-v4-e3388fd364c6",
"base-branch": "master",
"prefixes": [],
"history": {
"v1": [
"20230912-gralloc-api-v4-v1-0-0f80402d8e7a@baylibre.com"
],
"v2": [
"20230912-gralloc-api-v4-v2-0-e859da63f98c@baylibre.com"
],
"v3": [
"20230923-gralloc-api-v4-v3-0-9a9e039284ba@baylibre.com"
]
}
}
}
Diffstat (limited to 'src/android/jpeg/thumbnailer.cpp')
0 files changed, 0 insertions, 0 deletions