drm_hwcomposer: Extract DrmHwc abstract base class
DrmHwc holds implementation details that can be shared between hwc2 and
hwc3. It exposes abstract functions for implementing callbacks to hwc
clients.
Leave the HWC2 specific implementation details in the DrmHwcTwo class, such
as the client callback implementation, and implement the DrmHwc abstract
functions in terms of hwc2.
DrmHwc is based on the DrmHwcInterface extracted in
(drm_hwcomposer: Connect ComposerClient with HwcDisplay) from !238
Co-authored-by: Dennis Tsiang <dennis.tsiang@arm.com>
Co-authored-by: Normunds Rieksts <normunds.rieksts@arm.com>
Signed-off-by: Drew Davenport <ddavenport@chromium.org>
diff --git a/hwc2_device/meson.build b/hwc2_device/meson.build
index 7e6b8f4..6a9a93a 100644
--- a/hwc2_device/meson.build
+++ b/hwc2_device/meson.build
@@ -6,14 +6,23 @@
'HwcLayer.cpp',
)
+drmhwc_hwc2_common = static_library(
+ 'drm_hwc2',
+ src_hwc2_device,
+# TODO remove hwc2 flags from common code (backends needs rework)
+ cpp_args : common_cpp_flags + hwc2_cpp_flags,
+ dependencies : deps,
+ link_with: drmhwc_common,
+ include_directories: inc_include,
+)
+
shared_library(
'hwcomposer.drm',
- src_hwc2_device,
name_prefix : '',
cpp_args : common_cpp_flags + hwc2_cpp_flags,
dependencies : deps,
install : true,
- link_whole: drmhwc_common,
+ link_whole: [drmhwc_common, drmhwc_hwc2_common],
install_dir : get_option('libdir') / 'hw',
include_directories: inc_include,
-)
+)
\ No newline at end of file