gem5/src/unittest
Andreas Sandberg db5c9a5f90 base: Redesign internal frame buffer handling
Currently, frame buffer handling in gem5 is quite ad hoc. In practice,
we pass around naked pointers to raw pixel data and expect consumers
to convert frame buffers using the (broken) VideoConverter.

This changeset completely redesigns the way we handle frame buffers
internally. In summary, it fixes several color conversion bugs, adds
support for more color formats (e.g., big endian), and makes the code
base easier to follow.

In the new world, gem5 always represents pixel data using the Pixel
struct when pixels need to be passed between different classes (e.g.,
a display controller and the VNC server). Producers of entire frames
(e.g., display controllers) should use the FrameBuffer class to
represent a frame.

Frame producers are expected to create one instance of the FrameBuffer
class in their constructors and register it with its consumers
once. Consumers are expected to check the dimensions of the frame
buffer when they consume it.

Conversion between the external representation and the internal
representation is supported for all common "true color" RGB formats of
up to 32-bit color depth. The external pixel representation is
expected to be between 1 and 4 bytes in either big endian or little
endian. Color channels are assumed to be contiguous ranges of bits
within each pixel word. The external pixel value is scaled to an 8-bit
internal representation using a floating multiplication to map it to
the entire 8-bit range.
2015-05-23 13:37:03 +01:00
..
bituniontest.cc test: Add a unittest for the BitUnion types. 2015-01-07 00:34:40 -08:00
bitvectest.cc unittest: Add unit tests to the scons framework. 2008-10-02 11:27:01 -07:00
circletest.cc unittest: Add unit tests to the scons framework. 2008-10-02 11:27:01 -07:00
cprintftest.cc includes: sort all includes 2011-04-15 10:44:06 -07:00
cprintftime.cc includes: sort all includes 2011-04-15 10:44:06 -07:00
fbtest.cc base: Redesign internal frame buffer handling 2015-05-23 13:37:03 +01:00
foo.ini unittest: Cleanup unit tests. Follow style. Garbage Collect. 2008-10-02 11:26:59 -07:00
genini.py Updated Authors from bk prs info 2006-05-31 19:26:56 -04:00
initest.cc unittest: Fix build errors 2014-01-30 12:21:58 -06:00
nmtest.cc unittest: Add unit tests to the scons framework. 2008-10-02 11:27:01 -07:00
rangemaptest.cc unittest: Fix build errors 2014-01-30 12:21:58 -06:00
refcnttest.cc Unit tests: Convert the refcnttest unit test to use the new EXPECT macros. 2011-01-18 01:27:04 -08:00
SConscript base: Redesign internal frame buffer handling 2015-05-23 13:37:03 +01:00
stattest.cc unittest: Fix build errors 2014-01-30 12:21:58 -06:00
stattest.i unittest: Make unit tests capable of using swig and python, convert stattest 2011-04-15 10:45:11 -07:00
stattestmain.py unittest: Make unit tests capable of using swig and python, convert stattest 2011-04-15 10:45:11 -07:00
strnumtest.cc unittest: Cleanup unit tests. Follow style. Garbage Collect. 2008-10-02 11:26:59 -07:00
symtest.cc unittest: Fix build errors 2014-01-30 12:21:58 -06:00
tokentest.cc Updated Authors from bk prs info 2006-05-31 19:26:56 -04:00
trietest.cc sim: A trie data structure specifically to speed up paging lookups. 2012-04-14 23:19:34 -07:00
unittest.cc copyright: clean up copyright blocks 2011-06-02 14:36:35 -07:00
unittest.hh copyright: clean up copyright blocks 2011-06-02 14:36:35 -07:00