From d06ebbe62bf0e07a7875d8bfe95f0c4e955b1a36 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bruyère Date: Wed, 17 Jun 2026 08:22:32 +0200 Subject: save_png option for samples --- samples/VkvgTest.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'samples/VkvgTest.cpp') diff --git a/samples/VkvgTest.cpp b/samples/VkvgTest.cpp index d478691..02933b0 100644 --- a/samples/VkvgTest.cpp +++ b/samples/VkvgTest.cpp @@ -30,6 +30,10 @@ void VkvgTest::initTest(SampleApp* app) { void VkvgTest::performTest() { testFunc(this); } void VkvgTest::cleanTest() { vkDeviceWaitIdle(vkh_device_get_vkdev(app->vkhDev)); + if (this->app->save_img) { + std::string path = this->name + ".png"; + vkvg_surface_write_to_png(surf, path.c_str()); + } vkvg_surface_destroy(surf); vkvg_device_destroy(device); vkDeviceWaitIdle(vkh_device_get_vkdev(app->vkhDev)); -- cgit v1.3.1-4-g156e