From bbc410dae87a2b80796aabccc9ff36ffb9139613 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 27 Sep 2016 14:58:40 -0500 Subject: [PATCH] push2: add code to render screen to PNG files for screenshot purposes --- libs/surfaces/push2/canvas.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libs/surfaces/push2/canvas.cc b/libs/surfaces/push2/canvas.cc index faa8896f55..12c404fb9e 100644 --- a/libs/surfaces/push2/canvas.cc +++ b/libs/surfaces/push2/canvas.cc @@ -70,6 +70,15 @@ Push2Canvas::vblank () DEBUG_TRACE (DEBUG::Push2, "re-blit to device frame buffer\n"); /* something rendered, update device_frame_buffer */ blit_to_device_frame_buffer (); + +#define RENDER_LAYOUTS +#ifdef RENDER_LAYOUTS + if (p2.current_layout()) { + std::string s = p2.current_layout()->name(); + s += ".png"; + frame_buffer->write_to_png (s); + } +#endif } int transferred = 0; -- 2.30.2