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/bitmap.hh | |
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/bitmap.hh')
-rw-r--r-- | src/base/bitmap.hh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/base/bitmap.hh b/src/base/bitmap.hh index 9dfaa87a1..e9ad15473 100644 --- a/src/base/bitmap.hh +++ b/src/base/bitmap.hh @@ -36,6 +36,7 @@ * * Authors: William Wang * Ali Saidi + * Chris Emmons */ #ifndef __BASE_BITMAP_HH__ #define __BASE_BITMAP_HH__ @@ -62,6 +63,9 @@ class Bitmap */ Bitmap(VideoConvert::Mode mode, uint16_t w, uint16_t h, uint8_t *d); + /** Destructor */ + ~Bitmap(); + /** Provide the converter with the data that should be output. It will be * converted into rgb8888 and write out when write() is called. * @param d the data @@ -71,7 +75,13 @@ class Bitmap /** Write the provided data into the fstream provided * @param bmp stream to write to */ - void write(std::ostream *bmp); + void write(std::ostream *bmp) const; + + /** Gets a hash over the bitmap for quick comparisons to other bitmaps. + * @return hash of the bitmap + */ + uint64_t getHash() const { return vc.getHash(data); } + private: VideoConvert::Mode mode; @@ -81,6 +91,9 @@ class Bitmap VideoConvert vc; + mutable char *headerBuffer; + static const size_t sizeofHeaderBuffer; + struct Magic { unsigned char magic_number[2]; |