Implement objects associated with VkSurface
authorRosen Zhelev <rosen.zhelev@arm.com>
Wed, 21 Jul 2021 19:19:52 +0000 (20:19 +0100)
committerRosen Zhelev <rosen.zhelev@arm.com>
Tue, 17 Aug 2021 15:42:21 +0000 (16:42 +0100)
commitc7be05e3ff0d8ef022310d39cc6681acd82eabd4
treed1fa3c144d0262bd457743639c1196d95d431045
parentfeb2445f2abb712c287016ddae7acd439c9f4b30
Implement objects associated with VkSurface

Defines an abstract wsi::surface object to be implemented by each WSI
backend. This object is then associated with the corresponding VkSurface
object in the instance specific data.

To keep track of these objects the layer now intercepts
vkDestroySurfaceKHR, while specific surface creation entrypoints are
intercepted by individual WSI backends.

In addition this change should allow for fixing incompatibility issues
with layers that wrap VkSurface which breaks casting to the Loader's ICD
VkSurface type.

Make greater use of util::unique_ptr and allow for such pointers to be
constructable when casting derived types.

Change-Id: I163e9c47088ad9989583ebce1319b1fc05559d73
Signed-off-by: Rosen Zhelev <rosen.zhelev@arm.com>
19 files changed:
CMakeLists.txt
layer/layer.cpp
layer/private_data.cpp
layer/private_data.hpp
layer/surface_api.cpp
layer/surface_api.hpp
layer/swapchain_api.cpp
util/custom_allocator.hpp
wsi/headless/surface.cpp [new file with mode: 0644]
wsi/headless/surface.hpp [new file with mode: 0644]
wsi/headless/surface_properties.cpp
wsi/headless/surface_properties.hpp
wsi/surface.hpp [new file with mode: 0644]
wsi/surface_properties.hpp
wsi/wayland/surface.cpp [new file with mode: 0644]
wsi/wayland/surface.hpp [new file with mode: 0644]
wsi/wayland/surface_properties.cpp
wsi/wsi_factory.cpp
wsi/wsi_factory.hpp