Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions flutter/shell/platform/embedder/embedder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 8 additions & 0 deletions flutter/shell/platform/tizen/tizen_renderer_vulkan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "flutter/shell/platform/tizen/tizen_renderer_vulkan.h"

#include <app.h>
#include <stddef.h>
#include <optional>
#include "flutter/shell/platform/tizen/external_texture_pixel_vulkan.h"
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -200,6 +206,8 @@ FlutterRendererConfig TizenRendererVulkan::GetRendererConfig() {
return engine->texture_registrar()->PopulateVulkanTexture(texture_id, width,
height, texture);
};
config.vulkan.cache_path =
cache_path_.empty() ? nullptr : cache_path_.c_str();
return config;
}

Expand Down
1 change: 1 addition & 0 deletions flutter/shell/platform/tizen/tizen_renderer_vulkan.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading