android: framebuffer: Add HALFrameBuffer and replace FrameBuffer

HALFrameBuffer is derived from FrameBuffer with access to
buffer_handle_t, which is needed for JEA usage.

Signed-off-by: Harvey Yang <chenghaoyang@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Han-Lin Chen <hanlinchen@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Harvey Yang 2023-02-08 03:33:16 +00:00 committed by Laurent Pinchart
parent 4843bfa66d
commit b64fa1363c
9 changed files with 72 additions and 15 deletions

View file

@ -13,9 +13,10 @@
#include <libcamera/base/class.h>
#include <libcamera/camera.h>
#include <libcamera/framebuffer.h>
#include <libcamera/geometry.h>
#include "hal_framebuffer.h"
class CameraDevice;
class PlatformFrameBufferAllocator : libcamera::Extensible
@ -31,7 +32,7 @@ public:
* Note: The returned FrameBuffer needs to be destroyed before
* PlatformFrameBufferAllocator is destroyed.
*/
std::unique_ptr<libcamera::FrameBuffer> allocate(
std::unique_ptr<HALFrameBuffer> allocate(
int halPixelFormat, const libcamera::Size &size, uint32_t usage);
};
@ -44,7 +45,7 @@ PlatformFrameBufferAllocator::PlatformFrameBufferAllocator( \
PlatformFrameBufferAllocator::~PlatformFrameBufferAllocator() \
{ \
} \
std::unique_ptr<libcamera::FrameBuffer> \
std::unique_ptr<HALFrameBuffer> \
PlatformFrameBufferAllocator::allocate(int halPixelFormat, \
const libcamera::Size &size, \
uint32_t usage) \