diff options
author | Chris Emmons <chris.emmons@arm.com> | 2011-12-01 00:15:26 -0800 |
---|---|---|
committer | Chris Emmons <chris.emmons@arm.com> | 2011-12-01 00:15:26 -0800 |
commit | 9aea847f5891214f456cc9d6e173d7fbb1a30c0a (patch) | |
tree | 71e5a57a62686debf7b8883d6f87f3a65a609098 /src/base/vnc/convert.cc | |
parent | 5bde1d359f0a0ce1d5ed46c3a9bb0ba33882f7b6 (diff) | |
download | gem5-9aea847f5891214f456cc9d6e173d7fbb1a30c0a.tar.xz |
VNC: Add support for capturing frame buffer to file each time it is changed.
When a change in the frame buffer from the VNC server is detected, the new
frame is stored out to the m5out/frames_*/ directory. Specifiy the flag
"--frame-capture" when running configs/example/fs.py to enable this behavior.
--HG--
extra : rebase_source : d4e08e83f4fa6ff79f3dc9c433fc1f0487e057fc
Diffstat (limited to 'src/base/vnc/convert.cc')
-rw-r--r-- | src/base/vnc/convert.cc | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/base/vnc/convert.cc b/src/base/vnc/convert.cc index cd1502ce6..915a99407 100644 --- a/src/base/vnc/convert.cc +++ b/src/base/vnc/convert.cc @@ -67,7 +67,7 @@ VideoConvert::~VideoConvert() } uint8_t* -VideoConvert::convert(uint8_t *fb) +VideoConvert::convert(const uint8_t *fb) const { switch (inputMode) { case bgr565: @@ -82,7 +82,7 @@ VideoConvert::convert(uint8_t *fb) } uint8_t* -VideoConvert::m565rgb8888(uint8_t *fb, bool bgr) +VideoConvert::m565rgb8888(const uint8_t *fb, bool bgr) const { uint8_t *out = new uint8_t[area() * sizeof(uint32_t)]; uint32_t *out32 = (uint32_t*)out; @@ -113,7 +113,7 @@ VideoConvert::m565rgb8888(uint8_t *fb, bool bgr) uint8_t* -VideoConvert::bgr8888rgb8888(uint8_t *fb) +VideoConvert::bgr8888rgb8888(const uint8_t *fb) const { uint8_t *out = new uint8_t[area() * sizeof(uint32_t)]; uint32_t *out32 = (uint32_t*)out; @@ -136,4 +136,21 @@ VideoConvert::bgr8888rgb8888(uint8_t *fb) return out; } +/* +uint64_t +VideoConvert::getHash(const uint8_t *fb) const +{ + const uint8_t *fb_e = fb + area(); + + uint64_t hash = 1; + while (fb < fb_e - 8) { + hash += *((const uint64_t*)fb); + fb += 8; + } + + while (fb < fb_e) { + hash += *(fb++); + } + return hash; +}*/ |