diff options
author | Harvey Yang <chenghaoyang@chromium.org> | 2023-02-08 03:33:16 +0000 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-02-10 00:47:41 +0200 |
commit | b64fa1363c289936da145fb8faf474838b514854 (patch) | |
tree | 743b5d789b80a344a8dfd09ea98793ea734171eb /src/android/hal_framebuffer.h | |
parent | 4843bfa66dc117e94ce61d2b70b89958a7c9af3d (diff) |
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>
Diffstat (limited to 'src/android/hal_framebuffer.h')
-rw-r--r-- | src/android/hal_framebuffer.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/android/hal_framebuffer.h b/src/android/hal_framebuffer.h new file mode 100644 index 00000000..dc96a7e1 --- /dev/null +++ b/src/android/hal_framebuffer.h @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2022, Google Inc. + * + * hal_framebuffer.h - HAL Frame Buffer Handling + */ + +#pragma once + +#include "libcamera/internal/framebuffer.h" + +#include <hardware/camera3.h> + +class HALFrameBuffer final : public libcamera::FrameBuffer +{ +public: + HALFrameBuffer(std::unique_ptr<Private> d, + buffer_handle_t handle); + HALFrameBuffer(const std::vector<Plane> &planes, + buffer_handle_t handle); + + buffer_handle_t handle() const { return handle_; } + +private: + buffer_handle_t handle_; +}; |