diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2022-10-27 14:33:16 +0200 |
---|---|---|
committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2022-11-10 09:42:16 +0100 |
commit | b32f5e5b495ef73f25d3156d24a83fffd33f02be (patch) | |
tree | 5651504ad55f3609163c85879e0ac6d726c6db27 /src/core/ozone/ozone_platform_qt.cpp | |
parent | 6fb80f47941b555f1a9455d3bd3d189b90092b60 (diff) |
Add Vulkan rendering support
Updates 3rdparty:
* 8b7ce4ef70d Make GrVkImage external
Task-number: QTBUG-107669
Change-Id: If7fbe1f20538598dd1d4f3a67be17c9f7d06a3cd
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/ozone/ozone_platform_qt.cpp')
-rw-r--r-- | src/core/ozone/ozone_platform_qt.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/ozone/ozone_platform_qt.cpp b/src/core/ozone/ozone_platform_qt.cpp index 8ab3aa1a7..71315a049 100644 --- a/src/core/ozone/ozone_platform_qt.cpp +++ b/src/core/ozone/ozone_platform_qt.cpp @@ -4,6 +4,7 @@ #include "ozone_platform_qt.h" #if defined(USE_OZONE) +#include "base/no_destructor.h" #include "ui/base/buildflags.h" #include "ui/base/ime/input_method.h" #include "ui/display/types/native_display_delegate.h" @@ -52,6 +53,8 @@ public: ui::OverlayManagerOzone* GetOverlayManager() override; std::unique_ptr<InputMethod> CreateInputMethod(internal::InputMethodDelegate *delegate, gfx::AcceleratedWidget widget) override; std::unique_ptr<ui::PlatformScreen> CreateScreen() override { return nullptr; } + const PlatformProperties &GetPlatformProperties() override; + private: bool InitializeUI(const ui::OzonePlatform::InitParams &) override; void InitializeGPU(const ui::OzonePlatform::InitParams &) override; @@ -76,6 +79,20 @@ OzonePlatformQt::OzonePlatformQt() {} OzonePlatformQt::~OzonePlatformQt() {} +const ui::OzonePlatform::PlatformProperties &OzonePlatformQt::GetPlatformProperties() +{ + static base::NoDestructor<ui::OzonePlatform::PlatformProperties> properties; + static bool initialized = false; + if (!initialized) { + properties->uses_external_vulkan_image_factory = true; + properties->fetch_buffer_formats_for_gmb_on_gpu = true; + + initialized = true; + } + + return *properties; +} + ui::SurfaceFactoryOzone* OzonePlatformQt::GetSurfaceFactoryOzone() { return surface_factory_ozone_.get(); |