push2: add code to render screen to PNG files for screenshot purposes
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 27 Sep 2016 19:58:40 +0000 (14:58 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 27 Sep 2016 19:59:32 +0000 (14:59 -0500)
libs/surfaces/push2/canvas.cc

index faa8896f553a9f3f18af16b76596ae26943357b1..12c404fb9e579f851253e589f6374c2ba43e2a04 100644 (file)
@@ -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;