summaryrefslogtreecommitdiffstatsci
path: root/samples/VkvgTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'samples/VkvgTest.cpp')
-rw-r--r--samples/VkvgTest.cpp4
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));