| 192 | } |
| 193 | |
| 194 | void destroy() { |
| 195 | if (!texture_) |
| 196 | return; |
| 197 | if (!g_texture_service_alive) { |
| 198 | texture_.release(); |
| 199 | } else if (lfs::python::on_graphics_thread()) { |
| 200 | texture_.reset(); |
| 201 | } else { |
| 202 | auto* raw = texture_.release(); |
| 203 | lfs::python::schedule_graphics_callback([raw]() { delete raw; }); |
| 204 | } |
| 205 | width_ = height_ = 0; |
| 206 | } |
| 207 | |
| 208 | std::unique_ptr<lfs::vis::gui::VulkanUiTexture> release_texture() { |
| 209 | width_ = height_ = 0; |
no test coverage detected