Go to the documentation of this file.
47 : pixels(
width * height),
48 _width(
width), _height(height)
54 : _width(0), _height(0)
98 static const Pixel black(0, 0, 0);
125 reinterpret_cast<const Bytef *
>(
pixels.data()),
static const FrameBuffer dummy
Static "dummy" frame buffer.
void clear()
Fill the frame buffer with black pixels.
std::vector< Pixel > pixels
Frame buffer backing store.
#define UNSERIALIZE_SCALAR(scalar)
Configurable RGB pixel converter.
void copyIn(const uint8_t *fb, const PixelConverter &conv)
Fill the frame buffer with pixel data from an external buffer of the same width and height as this fr...
#define UNSERIALIZE_CONTAINER(member)
unsigned _width
Width in pixels.
void resize(unsigned width, unsigned height)
Resize the frame buffer.
FrameBuffer()
Create an empty (0x0) frame buffer.
const Pixel & pixel(unsigned x, unsigned y) const
Get a pixel from an (x, y) coordinate.
Pixel toPixel(uint32_t word) const
Get the Pixel representation of a color word.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
unsigned area() const
Total number of pixels in frame buffer.
unsigned length
Bytes per pixel when stored in memory (including padding)
Internal gem5 representation of a Pixel.
#define SERIALIZE_SCALAR(scalar)
void copyOut(uint8_t *fb, const PixelConverter &conv) const
Store the contents of this frame buffer in an external buffer of the same width and height as this fr...
void fill(const Pixel &pixel)
Fill the frame buffer with a single pixel value.
unsigned _height
Height in pixels.
void serialize(CheckpointOut &cp) const override
Serialize an object.
Internal gem5 representation of a frame buffer.
#define SERIALIZE_CONTAINER(member)
uint64_t getHash() const
Create a hash of the image that can be used for quick comparisons.
std::ostream CheckpointOut
unsigned width() const
Frame buffer width in pixels.
unsigned height() const
Frame buffer height in pixels.
uint32_t fromPixel(const Pixel &pixel) const
Convert a Pixel into a color word.
Generated on Wed Sep 30 2020 14:02:07 for gem5 by doxygen 1.8.17