gem5  v21.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Functions
imgwriter.cc File Reference
#include "base/imgwriter.hh"
#include "base/bmpwriter.hh"
#include "base/logging.hh"
#include "config/use_png.hh"

Go to the source code of this file.

Functions

std::unique_ptr< ImgWritercreateImgWriter (Enums::ImageFormat type, const FrameBuffer *fb)
 Factory Function which allocates a ImgWriter object and returns a smart pointer to it. More...
 

Function Documentation

◆ createImgWriter()

std::unique_ptr<ImgWriter> createImgWriter ( Enums::ImageFormat  type,
const FrameBuffer fb 
)

Factory Function which allocates a ImgWriter object and returns a smart pointer to it.

The dynamic type of the object being pointed depends upon the enum type passed as a first parameter. If the enum contains an invalid value, the function will produce a warning and will default to Bitamp.

Parameters
typeImage writer type (e.g. Bitamp, Png)
fbPointer to a FrameBuffer object This contains the raw data which will be stored as an image when calling the appropriate object method
Returns
smart pointer to the allocated Image Writer

Definition at line 50 of file imgwriter.cc.

References ArmISA::fb, M5_FALLTHROUGH, X86ISA::type, and warn.

Referenced by VncInput::setFrameBuffer().


Generated on Tue Mar 23 2021 19:41:31 for gem5 by doxygen 1.8.17