Skip to content

Commit

Permalink
Development/compositor2306 (#737)
Browse files Browse the repository at this point in the history
* Compositor: enable position independent code

* Compositor: aline test dmabuffer

* Compositor: add plugin implementation lib

* Compositor: move tests and fix some other code

* Compositor: tracing thingies

* Compositor: drop the external access in favour of top level locator

* Compositor: adding plugin communication socket

* Compositor: make the client bridge part in the volatile path

* Compositor: update the path env variable

* CompositorClient: we need to find  CompositorBufferType

* Compositor: RPI fixes

---------

Co-authored-by: Pierre Wielders <[email protected]>
  • Loading branch information
bramoosterhuis and pwielders authored Aug 8, 2023
1 parent 4daf016 commit 92989d0
Show file tree
Hide file tree
Showing 30 changed files with 1,283 additions and 93 deletions.
7 changes: 4 additions & 3 deletions Compositor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ target_link_libraries(${MODULE_NAME}
install(TARGETS ${MODULE_NAME}
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/${STORAGE_DIRECTORY}/plugins)

if(PLUGIN_COMPOSITOR_SERVER)
add_subdirectory(server)
endif()

add_subdirectory(lib)

add_library(platform::implementation ALIAS ${PLATFORM_COMPOSITOR})

add_subdirectory(test)

write_config()
2 changes: 2 additions & 0 deletions Compositor/Compositor.conf.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
autostart = "@PLUGIN_COMPOSITOR_AUTOSTART@"

communicator = "/communicator|0777"

configuration = JSON()

configuration.add("resolution", "@PLUGIN_COMPOSITOR_RESOLUTION@")
Expand Down
4 changes: 0 additions & 4 deletions Compositor/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,3 @@ if("${PLUGIN_COMPOSITOR_IMPLEMENTATION}" STREQUAL "Nexus")
else()
add_subdirectory (${PLUGIN_COMPOSITOR_IMPLEMENTATION})
endif()

#if(PLUGIN_COMPOSITOR_TEST)
add_subdirectory (Test)
#endif()
38 changes: 36 additions & 2 deletions Compositor/lib/Mesa/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# If not stated otherwise in this file or this component's LICENSE file the
# following copyright and licenses apply:
#
# Copyright 2020 Metrological
# Copyright 2023 Metrological
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -20,13 +20,14 @@ set(TARGET ${PLATFORM_COMPOSITOR})
message(STATUS "Setting up ${TARGET} for Mesa platfrom")

find_package(${NAMESPACE}Core REQUIRED)
find_package(${NAMESPACE}COM REQUIRED)
find_package(${NAMESPACE}Plugins REQUIRED)
find_package(${NAMESPACE}Definitions REQUIRED)
find_package(${NAMESPACE}CompositorBufferType REQUIRED)
find_package(CompileSettingsDebug CONFIG REQUIRED)

find_package(gbm REQUIRED)
find_package(libdrm REQUIRED)

find_package(EGL REQUIRED)
find_package(GLESv2 REQUIRED)

Expand All @@ -39,3 +40,36 @@ add_subdirectory(drm)
add_subdirectory(buffer)
add_subdirectory(backend)
add_subdirectory(renderer)

add_library(${PLATFORM_COMPOSITOR} SHARED Compositor.cpp)

target_link_libraries(${PLATFORM_COMPOSITOR}
PRIVATE
${NAMESPACE}Core::${NAMESPACE}Core
${NAMESPACE}Plugins::${NAMESPACE}Plugins
${NAMESPACE}COM::${NAMESPACE}COM
${NAMESPACE}CompositorBufferType::${NAMESPACE}CompositorBufferType
${NAMESPACE}Definitions::${NAMESPACE}Definitions
CompileSettingsDebug::CompileSettingsDebug
common::include
common::buffer
common::backend
common::transformation
common::renderer
common::drm
)

set_target_properties(${PLATFORM_COMPOSITOR} PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED YES
FRAMEWORK FALSE
POSITION_INDEPENDENT_CODE ON
)

install(TARGETS ${PLATFORM_COMPOSITOR}
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/${NAMESPACE}/Compositor
)

add_library(compositor::platform ALIAS ${PLATFORM_COMPOSITOR})

# add_subdirectory(test)
Loading

0 comments on commit 92989d0

Please sign in to comment.