diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2026-06-17 08:22:32 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2026-09-04 11:06:23 +0200 |
| commit | d06ebbe62bf0e07a7875d8bfe95f0c4e955b1a36 (patch) | |
| tree | 8c5af597f63a22857119b217ec691f99f6578c2a /samples/VkvgTest.cpp | |
| parent | 9a394c11e7a3e6a2c27b361d40831c61d5da8a1e (diff) | |
save_png option for samples
Diffstat (limited to 'samples/VkvgTest.cpp')
| -rw-r--r-- | samples/VkvgTest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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)); |