From 53399b65913bc7acc51ebc5c68bf4796a0aad8c3 Mon Sep 17 00:00:00 2001 From: Xiaowei Guan Date: Wed, 15 Jul 2026 23:27:39 +0800 Subject: [PATCH 1/2] Support vulkan pipeline cache --- flutter/shell/platform/embedder/embedder.h | 5 +++++ flutter/shell/platform/tizen/tizen_renderer_vulkan.cc | 7 +++++++ flutter/shell/platform/tizen/tizen_renderer_vulkan.h | 1 + 3 files changed, 13 insertions(+) diff --git a/flutter/shell/platform/embedder/embedder.h b/flutter/shell/platform/embedder/embedder.h index 5475f275..c88b158d 100644 --- a/flutter/shell/platform/embedder/embedder.h +++ b/flutter/shell/platform/embedder/embedder.h @@ -1059,6 +1059,11 @@ typedef struct { /// that external texture details can be supplied to the engine for subsequent /// composition. FlutterVulkanTextureFrameCallback external_texture_frame_callback; + /// The path to the Vulkan pipeline cache data. + /// The string can be collected after the call to `FlutterEngineRun` returns. + /// The string must be NULL terminated. + /// If NULL, Impeller will not use the Vulkan pipeline cache. + const char* cache_path; } FlutterVulkanRendererConfig; typedef struct { diff --git a/flutter/shell/platform/tizen/tizen_renderer_vulkan.cc b/flutter/shell/platform/tizen/tizen_renderer_vulkan.cc index 3be5face..22c7e87d 100644 --- a/flutter/shell/platform/tizen/tizen_renderer_vulkan.cc +++ b/flutter/shell/platform/tizen/tizen_renderer_vulkan.cc @@ -4,6 +4,7 @@ #include "flutter/shell/platform/tizen/tizen_renderer_vulkan.h" +#include #include #include #include "flutter/shell/platform/tizen/external_texture_pixel_vulkan.h" @@ -49,6 +50,11 @@ TizenRendererVulkan::TizenRendererVulkan(TizenViewBase* view) { FT_LOG(Info) << "Vulkan version: " << VK_VERSION_MAJOR(version) << "." << VK_VERSION_MINOR(version) << "." << VK_VERSION_PATCH(version); + char* cache_path = app_get_cache_path(); + if (cache_path) { + cache_path_ = cache_path; + free(cache_path); + } InitVulkan(view); } @@ -200,6 +206,7 @@ FlutterRendererConfig TizenRendererVulkan::GetRendererConfig() { return engine->texture_registrar()->PopulateVulkanTexture(texture_id, width, height, texture); }; + config.vulkan.cache_path = cache_path_.c_str(); return config; } diff --git a/flutter/shell/platform/tizen/tizen_renderer_vulkan.h b/flutter/shell/platform/tizen/tizen_renderer_vulkan.h index d2f2b53f..cc85151c 100644 --- a/flutter/shell/platform/tizen/tizen_renderer_vulkan.h +++ b/flutter/shell/platform/tizen/tizen_renderer_vulkan.h @@ -105,6 +105,7 @@ class TizenRendererVulkan : public TizenRenderer { bool resize_pending_ = false; int32_t width_ = 0; int32_t height_ = 0; + std::string cache_path_; }; } // namespace flutter From 2c2b85b40e850af894883da790619e26657a38ee Mon Sep 17 00:00:00 2001 From: Xiaowei Guan Date: Wed, 15 Jul 2026 23:32:55 +0800 Subject: [PATCH 2/2] Fix code review issue --- flutter/shell/platform/tizen/tizen_renderer_vulkan.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flutter/shell/platform/tizen/tizen_renderer_vulkan.cc b/flutter/shell/platform/tizen/tizen_renderer_vulkan.cc index 22c7e87d..df6e68ba 100644 --- a/flutter/shell/platform/tizen/tizen_renderer_vulkan.cc +++ b/flutter/shell/platform/tizen/tizen_renderer_vulkan.cc @@ -206,7 +206,8 @@ FlutterRendererConfig TizenRendererVulkan::GetRendererConfig() { return engine->texture_registrar()->PopulateVulkanTexture(texture_id, width, height, texture); }; - config.vulkan.cache_path = cache_path_.c_str(); + config.vulkan.cache_path = + cache_path_.empty() ? nullptr : cache_path_.c_str(); return config; }