Trigger save of the RD pipeline cache on application pause

This commit is contained in:
Fredia Huya-Kouadio 2025-12-30 19:25:29 -08:00
parent 1559ab34c6
commit be24804e1a
6 changed files with 28 additions and 6 deletions

View file

@ -717,6 +717,14 @@ void DisplayServerAndroid::notify_surface_changed(int p_width, int p_height) {
}
}
void DisplayServerAndroid::notify_application_paused() {
#if defined(RD_ENABLED)
if (rendering_device) {
rendering_device->update_pipeline_cache();
}
#endif // defined(RD_ENABLED)
}
DisplayServerAndroid::DisplayServerAndroid(const String &p_rendering_driver, DisplayServer::WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, int p_screen, Context p_context, int64_t p_parent_window, Error &r_error) {
rendering_driver = p_rendering_driver;