summaryrefslogtreecommitdiff
path: root/src/android/hal_framebuffer.cpp
diff options
context:
space:
mode:
authorHarvey Yang <chenghaoyang@chromium.org>2023-02-08 03:33:16 +0000
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-02-10 00:47:41 +0200
commitb64fa1363c289936da145fb8faf474838b514854 (patch)
tree743b5d789b80a344a8dfd09ea98793ea734171eb /src/android/hal_framebuffer.cpp
parent4843bfa66dc117e94ce61d2b70b89958a7c9af3d (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.cpp')
-rw-r--r--src/android/hal_framebuffer.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/android/hal_framebuffer.cpp b/src/android/hal_framebuffer.cpp
new file mode 100644
index 00000000..3f3d1ed1
--- /dev/null
+++ b/src/android/hal_framebuffer.cpp
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2022, Google Inc.
+ *
+ * hal_framebuffer.cpp - HAL Frame Buffer Handling
+ */
+
+#include "hal_framebuffer.h"
+
+#include <hardware/camera3.h>
+
+HALFrameBuffer::HALFrameBuffer(std::unique_ptr<Private> d,
+ buffer_handle_t handle)
+ : FrameBuffer(std::move(d)), handle_(handle)
+{
+}
+
+HALFrameBuffer::HALFrameBuffer(const std::vector<Plane> &planes,
+ buffer_handle_t handle)
+ : FrameBuffer(planes), handle_(handle)
+{
+}