38#ifndef __BASE_FRAMEBUFFER_HH__
39#define __BASE_FRAMEBUFFER_HH__
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
Internal gem5 representation of a frame buffer.
std::vector< Pixel > pixels
Frame buffer backing store.
FrameBuffer()
Create an empty (0x0) frame buffer.
uint64_t getHash() const
Create a hash of the image that can be used for quick comparisons.
void copyIn(const std::vector< 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...
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Pixel & pixel(unsigned x, unsigned y)
Get a pixel from an (x, y) coordinate.
unsigned _height
Height in pixels.
void copyOut(std::vector< 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...
unsigned height() const
Frame buffer height in pixels.
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 clear()
Fill the frame buffer with black pixels.
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...
unsigned _width
Width in pixels.
void resize(unsigned width, unsigned height)
Resize the frame buffer.
static const FrameBuffer dummy
Static "dummy" frame buffer.
const Pixel & pixel(unsigned x, unsigned y) const
Get a pixel from an (x, y) coordinate.
void serialize(CheckpointOut &cp) const override
Serialize an object.
unsigned width() const
Frame buffer width in pixels.
unsigned area() const
Total number of pixels in frame buffer.
Configurable RGB pixel converter.
Basic support for object serialization.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut
Internal gem5 representation of a Pixel.