From ad614bf24da852ecd28c03a5bcb72ecd24b37238 Mon Sep 17 00:00:00 2001 From: Dam Sunwoo Date: Thu, 17 Oct 2013 10:20:45 -0500 Subject: dev: Add option to disable framebuffer .bmp dump in run folder There is an option to enable/disable all framebuffer dumps, but the last frame always gets dumped in the run folder with no other way to disable it. These files can add up very quickly running many experiments. This patch adds an option to disable them. The default behavior remains unchanged. --- src/dev/arm/hdlcd.cc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/dev/arm/hdlcd.cc') diff --git a/src/dev/arm/hdlcd.cc b/src/dev/arm/hdlcd.cc index c5daebc9b..349b246c2 100644 --- a/src/dev/arm/hdlcd.cc +++ b/src/dev/arm/hdlcd.cc @@ -72,7 +72,8 @@ HDLcd::HDLcd(const Params *p) startFrameEvent(this), endFrameEvent(this), renderPixelEvent(this), fillPixelBufferEvent(this), intEvent(this), dmaDoneEventAll(MAX_OUTSTANDING_DMA_REQ_CAPACITY, this), - dmaDoneEventFree(MAX_OUTSTANDING_DMA_REQ_CAPACITY) + dmaDoneEventFree(MAX_OUTSTANDING_DMA_REQ_CAPACITY), + enableCapture(p->enable_capture) { pioSize = 0xFFFF; @@ -560,13 +561,15 @@ HDLcd::endFrame() { if (vnc) vnc->setDirty(); - if (!pic) - pic = simout.create(csprintf("%s.framebuffer.bmp", sys->name()), true); + if (enableCapture) { + if (!pic) + pic = simout.create(csprintf("%s.framebuffer.bmp", sys->name()), true); - assert(bmp); - assert(pic); - pic->seekp(0); - bmp->write(pic); + assert(bmp); + assert(pic); + pic->seekp(0); + bmp->write(pic); + } // start the next frame frameUnderway = false; -- cgit v1.2.3