The Pedigree Project 0.1
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Framebuffer Class Reference

#include <Framebuffer.h>

+ Inheritance diagram for Framebuffer:
+ Collaboration diagram for Framebuffer:

Classes

class  FrameGuard
 

Public Member Functions

size_t getWidth () const
 
size_t getHeight () const
 
Graphics::PixelFormat getFormat () const
 
bool getActive () const
 
void setActive (bool b)
 
void setPalette (uint32_t *palette, size_t nEntries)
 
uint32_t * getPalette () const
 
virtual void * getRawBuffer () const
 
virtual physical_uintptr_t getPhysicalPage (size_t offset) const
 
size_t getMappingFlags () const
 
void setMappingFlags (size_t flags)
 
virtual Graphics::Buffer * createBuffer (const void *srcData, Graphics::PixelFormat srcFormat, size_t width, size_t height, uint32_t *pPalette=0)
 
virtual void destroyBuffer (Graphics::Buffer *pBuffer)
 
void redraw (size_t x=~0UL, size_t y=~0UL, size_t w=~0UL, size_t h=~0UL, bool bChild=false)
 
virtual void blit (Graphics::Buffer *pBuffer, size_t srcx, size_t srcy, size_t destx, size_t desty, size_t width, size_t height, bool bLowestCall=true)
 
virtual void draw (void *pBuffer, size_t srcx, size_t srcy, size_t destx, size_t desty, size_t width, size_t height, Graphics::PixelFormat format=Graphics::Bits32_Argb, bool bLowestCall=true)
 
virtual void rect (size_t x, size_t y, size_t width, size_t height, uint32_t colour, Graphics::PixelFormat format=Graphics::Bits32_Argb, bool bLowestCall=true)
 
virtual void copy (size_t srcx, size_t srcy, size_t destx, size_t desty, size_t w, size_t h, bool bLowestCall=true)
 
virtual void line (size_t x1, size_t y1, size_t x2, size_t y2, uint32_t colour, Graphics::PixelFormat format=Graphics::Bits32_Argb, bool bLowestCall=true)
 
void setPixel (size_t x, size_t y, uint32_t colour, Graphics::PixelFormat format=Graphics::Bits32_Argb, bool bLowestCall=true)
 
void setXPos (size_t x)
 
void setYPos (size_t y)
 
void setWidth (size_t w)
 
void setHeight (size_t h)
 
void setFormat (Graphics::PixelFormat pf)
 
void setBytesPerPixel (size_t b)
 
uint32_t getBytesPerPixel () const
 
void setBytesPerLine (size_t b)
 
uint32_t getBytesPerLine () const
 
void setParent (Framebuffer *p)
 
Framebuffer * getParent () const
 
virtual void setFramebuffer (uintptr_t p)
 
bool initialise ()
 
bool claimTerminal ()
 
bool takeRedraw ()
 
void storeMode ()
 
void restoreMode ()
 
int enterMode (size_t desiredW, size_t desiredH, size_t desiredBpp)
 
int useCurrentMode ()
 
void * getFramebuffer () const
 
void flush (size_t x, size_t y, size_t w, size_t h)
 
cairo_format_t getFormat () const
 
size_t getWidth () const
 
size_t getHeight () const
 
size_t getBytesPerLine () const
 

Public Attributes

size_t m_XPos
 X position on our parent's framebuffer.
 
size_t m_YPos
 Y position on our parent's framebuffer.
 
size_t m_nWidth
 Width of the framebuffer in pixels.
 
size_t m_nHeight
 Height of the framebuffer in pixels.
 
Graphics::PixelFormat m_PixelFormat
 Framebuffer pixel format.
 
size_t m_nBytesPerPixel
 Bytes per pixel in this framebuffer.
 
size_t m_nBytesPerLine
 Bytes per line in this framebuffer.
 
Framebuffer * m_pParent
 Parent of this framebuffer.
 

Protected Member Functions

Graphics::Buffer bufferFromSelf ()
 
virtual void draw (Graphics::Buffer *pBuffer, size_t srcx, size_t srcy, size_t destx, size_t desty, size_t width, size_t height, bool bLowestCall=true)
 
void swBlit (Graphics::Buffer *pBuffer, size_t srcx, size_t srcy, size_t destx, size_t desty, size_t width, size_t height)
 
void swRect (size_t x, size_t y, size_t width, size_t height, uint32_t colour, Graphics::PixelFormat format)
 
void swCopy (size_t srcx, size_t srcy, size_t destx, size_t desty, size_t w, size_t h)
 
void swLine (size_t x1, size_t y1, size_t x2, size_t y2, uint32_t colour, Graphics::PixelFormat format)
 
void swDraw (void *pBuffer, size_t srcx, size_t srcy, size_t destx, size_t desty, size_t width, size_t height, Graphics::PixelFormat format=Graphics::Bits32_Argb, bool bLowestCall=true)
 
void swDraw (Graphics::Buffer *pBuffer, size_t srcx, size_t srcy, size_t destx, size_t desty, size_t width, size_t height, bool bLowestCall=true)
 
Graphics::Buffer * swCreateBuffer (const void *srcData, Graphics::PixelFormat srcFormat, size_t width, size_t height, uint32_t *pPalette)
 
void swDestroyBuffer (Graphics::Buffer *pBuffer)
 
virtual void hwRedraw (size_t x=~0UL, size_t y=~0UL, size_t w=~0UL, size_t h=~0UL)
 Inherited by drivers that provide a hardware redraw function.
 

Protected Attributes

uintptr_t m_FramebufferBase
 
uint32_t * m_Palette
 Current graphics palette - an array of 256 32-bit RGBA entries.
 
bool m_bActive
 Whether this framebuffer is active or not.
 

Private Member Functions

void swSetPixel (size_t x, size_t y, uint32_t colour, Graphics::PixelFormat format=Graphics::Bits32_Argb)
 
int mapMode (const pedigree_fb_mode &mode)
 
void releaseTerminal ()
 

Static Private Member Functions

static void terminalSignal (int signal)
 

Private Attributes

size_t m_MappingFlags = 0
 
void * m_pFramebuffer
 
size_t m_FramebufferSize
 
cairo_format_t m_Format
 
size_t m_Width
 
size_t m_Height
 
size_t m_BytesPerLine
 
int m_Fb
 
bool m_bStoredMode
 
pedigree_fb_mode m_StoredMode
 
int m_Terminal = -1
 
volatile sig_atomic_t m_TerminalActive = 1
 
volatile sig_atomic_t m_TerminalRedraw = 0
 
int m_PreviousDisplayMode = 0
 
vt_mode m_PreviousTerminalMode = {}
 
struct sigaction m_PreviousReleaseAction = {}
 
struct sigaction m_PreviousAcquireAction = {}
 
sigset_t m_PreviousTerminalMask
 

Detailed Description

This class provides a generic interface for interfacing with a framebuffer. Each display driver specialises this class to define the "base address" of the framebuffer in its own way (eg, allocate memory, or use a DMA region). There are a variety of default software-only operations, which are used by default if the main operational methods are not overridden. The drawing and palette entry points are retained for external display-driver ABI compatibility, even where there are no in-tree callers. Preserve their signatures and virtual method order.

Abstracts the system's framebuffer offering.

Definition at line 35 of file Framebuffer.h.

Constructor & Destructor Documentation

◆ Framebuffer()

Framebuffer::Framebuffer ( )

Definition at line 27 of file Framebuffer.cc.

◆ ~Framebuffer()

Framebuffer::~Framebuffer ( )
virtual

Definition at line 39 of file Framebuffer.cc.

Member Function Documentation

◆ blit()

void Framebuffer::blit ( Graphics::Buffer *  pBuffer,
size_t  srcx,
size_t  srcy,
size_t  destx,
size_t  desty,
size_t  width,
size_t  height,
bool  bLowestCall = true 
)
virtual

Blits a given buffer to the screen. See createBuffer.

Parameters
bLowestCallwhether this is the lowest level call for the chain or a call being passed up from a child somewhere in the chain.

Definition at line 134 of file Framebuffer.cc.

References blit(), m_pParent, m_XPos, m_YPos, and swBlit().

Referenced by blit().

+ Here is the caller graph for this function:

◆ bufferFromSelf()

Graphics::Buffer Framebuffer::bufferFromSelf ( )
protected

Definition at line 231 of file Framebuffer.cc.

◆ claimTerminal()

bool Framebuffer::claimTerminal ( )

Claim the active VT on the thread which will present every frame.

Definition at line 88 of file fb.cc.

◆ copy()

void Framebuffer::copy ( size_t  srcx,
size_t  srcy,
size_t  destx,
size_t  desty,
size_t  w,
size_t  h,
bool  bLowestCall = true 
)
virtual

Copies a rectangle already on the framebuffer to a new location

Reimplemented in VmwareGraphics::VmwareFramebuffer.

Definition at line 159 of file Framebuffer.cc.

References copy(), m_pParent, m_XPos, m_YPos, and swCopy().

Referenced by copy().

+ Here is the caller graph for this function:

◆ createBuffer()

Graphics::Buffer * Framebuffer::createBuffer ( const void *  srcData,
Graphics::PixelFormat  srcFormat,
size_t  width,
size_t  height,
uint32_t *  pPalette = 0 
)
virtual

Creates a new buffer to be used for blits from the given raw pixel data. Performs automatic conversion of the pixel format to the pixel format of the current display mode. Do not modify any of the members of the buffer structure, or attempt to inject your own pixels into the buffer. Once a buffer is created, it is only used for blitting to the screen and cannot be modified. It is expected that the buffer has been packed to its bit depth, and does not have any padding on each scanline at all. Do not delete the returned buffer yourself, pass it to destroyBuffer which performs a proper cleanup of all resources related to the buffer. The buffer should be padded to finish on a DWORD boundary. This is not padding per scanline but rather padding per buffer.

Definition at line 83 of file Framebuffer.cc.

References createBuffer(), m_pParent, and swCreateBuffer().

Referenced by createBuffer().

+ Here is the caller graph for this function:

◆ destroyBuffer()

void Framebuffer::destroyBuffer ( Graphics::Buffer *  pBuffer)
virtual

Destroys a created buffer. Frees its memory in both the system RAM and any references still in VRAM.

Definition at line 90 of file Framebuffer.cc.

◆ draw() [1/2]

void Framebuffer::draw ( Graphics::Buffer *  pBuffer,
size_t  srcx,
size_t  srcy,
size_t  destx,
size_t  desty,
size_t  width,
size_t  height,
bool  bLowestCall = true 
)
protectedvirtual

Special implementation of draw() where a Graphics::Buffer is already available. For use in redraw, and similar.

Definition at line 243 of file Framebuffer.cc.

◆ draw() [2/2]

void Framebuffer::draw ( void *  pBuffer,
size_t  srcx,
size_t  srcy,
size_t  destx,
size_t  desty,
size_t  width,
size_t  height,
Graphics::PixelFormat  format = Graphics::Bits32_Argb,
bool  bLowestCall = true 
)
virtual

Draws given raw pixel data to the screen. Used for framebuffer chains and applications which need to render constantly changing pixel buffers.

Definition at line 142 of file Framebuffer.cc.

Referenced by redraw().

+ Here is the caller graph for this function:

◆ enterMode()

int Framebuffer::enterMode ( size_t  desiredW,
size_t  desiredH,
size_t  desiredBpp 
)

Create framebuffer, enter desired mode.

Note
Mode set logic will try and find a mode in a lower colour depth if the desired one cannot be set.

Definition at line 316 of file fb.cc.

◆ flush()

void Framebuffer::flush ( size_t  x,
size_t  y,
size_t  w,
size_t  h 
)

Flush framebuffer in the given region.

Definition at line 350 of file fb.cc.

◆ getActive()

bool Framebuffer::getActive ( ) const

Definition at line 53 of file Framebuffer.cc.

◆ getBytesPerLine() [1/2]

uint32_t Framebuffer::getBytesPerLine ( ) const

Definition at line 215 of file Framebuffer.cc.

◆ getBytesPerLine() [2/2]

size_t Framebuffer::getBytesPerLine ( ) const
inline

Definition at line 93 of file pedigree_fb.h.

◆ getBytesPerPixel()

uint32_t Framebuffer::getBytesPerPixel ( ) const

Definition at line 207 of file Framebuffer.cc.

◆ getFormat() [1/2]

Graphics::PixelFormat Framebuffer::getFormat ( ) const

Definition at line 49 of file Framebuffer.cc.

◆ getFormat() [2/2]

cairo_format_t Framebuffer::getFormat ( ) const
inline

Get framebuffer colour format.

Definition at line 82 of file pedigree_fb.h.

◆ getFramebuffer()

void * Framebuffer::getFramebuffer ( ) const
inline

Retrieve base address of the framebuffer.

Definition at line 74 of file pedigree_fb.h.

◆ getHeight() [1/2]

size_t Framebuffer::getHeight ( ) const

Definition at line 45 of file Framebuffer.cc.

◆ getHeight() [2/2]

size_t Framebuffer::getHeight ( ) const
inline

Definition at line 90 of file pedigree_fb.h.

◆ getMappingFlags()

size_t Framebuffer::getMappingFlags ( ) const
inline

Definition at line 65 of file Framebuffer.h.

◆ getPalette()

uint32_t * Framebuffer::getPalette ( ) const

Definition at line 69 of file Framebuffer.cc.

◆ getParent()

Framebuffer * Framebuffer::getParent ( ) const

Definition at line 223 of file Framebuffer.cc.

◆ getPhysicalPage()

physical_uintptr_t Framebuffer::getPhysicalPage ( size_t  offset) const
virtual

Gets the physical page backing an offset in the framebuffer. This is used by direct framebuffer mappings such as /dev/fb. Providers backed only by a virtual buffer should retain the default failure.

Reimplemented in VirtioGpu::GpuFramebuffer.

Definition at line 79 of file Framebuffer.cc.

Referenced by FramebufferFile::getPhysicalPage().

+ Here is the caller graph for this function:

◆ getRawBuffer()

void * Framebuffer::getRawBuffer ( ) const
virtual

Gets a raw pointer to the framebuffer itself. There is no way to know if this pointer points to an MMIO region or real RAM, so it cannot be guaranteed to be safe.

Definition at line 73 of file Framebuffer.cc.

References getRawBuffer(), and m_pParent.

Referenced by getRawBuffer(), and FramebufferFile::readBlock().

+ Here is the caller graph for this function:

◆ getWidth() [1/2]

size_t Framebuffer::getWidth ( ) const

Definition at line 41 of file Framebuffer.cc.

◆ getWidth() [2/2]

size_t Framebuffer::getWidth ( ) const
inline

Get framebuffer dimensions.

Definition at line 87 of file pedigree_fb.h.

◆ hwRedraw()

void Framebuffer::hwRedraw ( size_t  x = ~0UL,
size_t  y = ~0UL,
size_t  w = ~0UL,
size_t  h = ~0UL 
)
protectedvirtual

Inherited by drivers that provide a hardware redraw function.

Reimplemented in VirtioGpu::GpuFramebuffer, and VmwareGraphics::VmwareFramebuffer.

Definition at line 704 of file Framebuffer.cc.

Referenced by redraw().

+ Here is the caller graph for this function:

◆ initialise()

bool Framebuffer::initialise ( )

General system-specific initialisation.

Definition at line 211 of file fb.cc.

◆ line()

void Framebuffer::line ( size_t  x1,
size_t  y1,
size_t  x2,
size_t  y2,
uint32_t  colour,
Graphics::PixelFormat  format = Graphics::Bits32_Argb,
bool  bLowestCall = true 
)
virtual

Draws a line one pixel wide between two points on the screen

Definition at line 167 of file Framebuffer.cc.

References line(), m_pParent, m_XPos, and m_YPos.

Referenced by line().

+ Here is the caller graph for this function:

◆ mapMode()

int Framebuffer::mapMode ( const pedigree_fb_mode &  mode)
private

Definition at line 247 of file fb.cc.

◆ rect()

void Framebuffer::rect ( size_t  x,
size_t  y,
size_t  width,
size_t  height,
uint32_t  colour,
Graphics::PixelFormat  format = Graphics::Bits32_Argb,
bool  bLowestCall = true 
)
virtual

Draws a single rectangle to the screen with the given colour.

Definition at line 151 of file Framebuffer.cc.

References m_pParent, m_XPos, m_YPos, rect(), and swRect().

Referenced by rect().

+ Here is the caller graph for this function:

◆ redraw()

void Framebuffer::redraw ( size_t  x = ~0UL,
size_t  y = ~0UL,
size_t  w = ~0UL,
size_t  h = ~0UL,
bool  bChild = false 
)

Performs an update of a region of this framebuffer. This function can be used by drivers to request an area of the framebuffer be redrawn, but is useless for non-hardware-accelerated devices.

Parameters
xleftmost x co-ordinate of the redraw area, ~0 for "invalid"
ytopmost y co-ordinate of the redraw area, ~0 for "invalid"
wwidth of the redraw area, ~0 for "invalid"
hheight of the redraw area, ~0 for "invalid"
bChildnon-zero if a child began the redraw, zero otherwise
Note
Because every redraw ends up redrawing a large region of the "root" framebuffer, it's not necessary to do framebuffer copies at any point. The only reason a framebuffer copy is done in this function is in the one case where a parent needs to override a child's framebuffer.
Note
If none of the above makes sense, you need to read the Pedigree graphics design doc: http://pedigree-project.org/issues/114
Todo:
nChildren parameter - this is not necessary if no children!

Definition at line 97 of file Framebuffer.cc.

References draw(), hwRedraw(), m_PixelFormat, m_pParent, m_XPos, m_YPos, and redraw().

Referenced by FramebufferFile::command(), X86Vga::moveCursor(), redraw(), and takeRedraw().

+ Here is the caller graph for this function:

◆ releaseTerminal()

void Framebuffer::releaseTerminal ( )
private

Definition at line 181 of file fb.cc.

◆ restoreMode()

void Framebuffer::restoreMode ( )

Restore saved mode.

Definition at line 236 of file fb.cc.

◆ setActive()

void Framebuffer::setActive ( bool  b)

Definition at line 57 of file Framebuffer.cc.

◆ setBytesPerLine()

void Framebuffer::setBytesPerLine ( size_t  b)

Definition at line 211 of file Framebuffer.cc.

◆ setBytesPerPixel()

void Framebuffer::setBytesPerPixel ( size_t  b)

Definition at line 203 of file Framebuffer.cc.

◆ setFormat()

void Framebuffer::setFormat ( Graphics::PixelFormat  pf)

Definition at line 199 of file Framebuffer.cc.

◆ setFramebuffer()

void Framebuffer::setFramebuffer ( uintptr_t  p)
virtual

Definition at line 227 of file Framebuffer.cc.

◆ setHeight()

void Framebuffer::setHeight ( size_t  h)

Definition at line 195 of file Framebuffer.cc.

◆ setMappingFlags()

void Framebuffer::setMappingFlags ( size_t  flags)
inline

Definition at line 68 of file Framebuffer.h.

◆ setPalette()

void Framebuffer::setPalette ( uint32_t *  palette,
size_t  nEntries 
)

Sets the palette used for palette-based colour formats. Takes an array of pixels in Bits32_Argb format.

Definition at line 61 of file Framebuffer.cc.

References Dec, Hex, and m_Palette.

Referenced by FramebufferFile::command().

+ Here is the caller graph for this function:

◆ setParent()

void Framebuffer::setParent ( Framebuffer *  p)

Definition at line 219 of file Framebuffer.cc.

◆ setPixel()

void Framebuffer::setPixel ( size_t  x,
size_t  y,
uint32_t  colour,
Graphics::PixelFormat  format = Graphics::Bits32_Argb,
bool  bLowestCall = true 
)

Sets an individual pixel on the framebuffer. Not inheritable.

Definition at line 175 of file Framebuffer.cc.

References m_pParent, m_XPos, m_YPos, setPixel(), and swSetPixel().

Referenced by setPixel().

+ Here is the caller graph for this function:

◆ setWidth()

void Framebuffer::setWidth ( size_t  w)

Definition at line 191 of file Framebuffer.cc.

◆ setXPos()

void Framebuffer::setXPos ( size_t  x)

Definition at line 183 of file Framebuffer.cc.

◆ setYPos()

void Framebuffer::setYPos ( size_t  y)

Definition at line 187 of file Framebuffer.cc.

◆ storeMode()

void Framebuffer::storeMode ( )

Store current mode (before switching).

Definition at line 223 of file fb.cc.

◆ swBlit()

void Framebuffer::swBlit ( Graphics::Buffer *  pBuffer,
size_t  srcx,
size_t  srcy,
size_t  destx,
size_t  desty,
size_t  width,
size_t  height 
)
protected
Todo:
This code is broken for the case where srcx/srcy are not zero. :(

Definition at line 351 of file Framebuffer.cc.

References Graphics::Buffer::base, Graphics::Buffer::bytesPerPixel, Graphics::Buffer::height, m_nBytesPerLine, m_nBytesPerPixel, m_nHeight, m_nWidth, UNLIKELY, and Graphics::Buffer::width.

Referenced by blit().

+ Here is the caller graph for this function:

◆ swCopy()

void Framebuffer::swCopy ( size_t  srcx,
size_t  srcy,
size_t  destx,
size_t  desty,
size_t  w,
size_t  h 
)
protected
Todo:
consider source bytes per line?

Definition at line 518 of file Framebuffer.cc.

References m_nBytesPerLine, m_nBytesPerPixel, m_nHeight, m_nWidth, and UNLIKELY.

Referenced by copy().

+ Here is the caller graph for this function:

◆ swCreateBuffer()

Graphics::Buffer * Framebuffer::swCreateBuffer ( const void *  srcData,
Graphics::PixelFormat  srcFormat,
size_t  width,
size_t  height,
uint32_t *  pPalette 
)
protected

◆ swDestroyBuffer()

void Framebuffer::swDestroyBuffer ( Graphics::Buffer *  pBuffer)
protected

Definition at line 341 of file Framebuffer.cc.

◆ swDraw() [1/2]

void Framebuffer::swDraw ( Graphics::Buffer *  pBuffer,
size_t  srcx,
size_t  srcy,
size_t  destx,
size_t  desty,
size_t  width,
size_t  height,
bool  bLowestCall = true 
)
protected

Definition at line 699 of file Framebuffer.cc.

◆ swDraw() [2/2]

void Framebuffer::swDraw ( void *  pBuffer,
size_t  srcx,
size_t  srcy,
size_t  destx,
size_t  desty,
size_t  width,
size_t  height,
Graphics::PixelFormat  format = Graphics::Bits32_Argb,
bool  bLowestCall = true 
)
protected

Definition at line 686 of file Framebuffer.cc.

◆ swLine()

void Framebuffer::swLine ( size_t  x1,
size_t  y1,
size_t  x2,
size_t  y2,
uint32_t  colour,
Graphics::PixelFormat  format 
)
protected

Definition at line 572 of file Framebuffer.cc.

◆ swRect()

void Framebuffer::swRect ( size_t  x,
size_t  y,
size_t  width,
size_t  height,
uint32_t  colour,
Graphics::PixelFormat  format 
)
protected
Todo:
Handle 24-bit properly
Todo:
Handle 24-bit properly

Definition at line 409 of file Framebuffer.cc.

References m_nBytesPerLine, m_nBytesPerPixel, m_nHeight, m_nWidth, m_Palette, m_PixelFormat, and UNLIKELY.

Referenced by rect().

+ Here is the caller graph for this function:

◆ swSetPixel()

void Framebuffer::swSetPixel ( size_t  x,
size_t  y,
uint32_t  colour,
Graphics::PixelFormat  format = Graphics::Bits32_Argb 
)
private

Sets an individual pixel on the framebuffer. Not inheritable.

Todo:
8-bit

Definition at line 650 of file Framebuffer.cc.

References m_nBytesPerLine, m_nBytesPerPixel, m_nHeight, m_nWidth, m_Palette, m_PixelFormat, and UNLIKELY.

Referenced by setPixel().

+ Here is the caller graph for this function:

◆ takeRedraw()

bool Framebuffer::takeRedraw ( )

A reacquired VT needs its retained scene presented again.

Definition at line 172 of file fb.cc.

References redraw().

◆ terminalSignal()

void Framebuffer::terminalSignal ( int  signal)
staticprivate

Definition at line 153 of file fb.cc.

◆ useCurrentMode()

int Framebuffer::useCurrentMode ( )

Create framebuffer using the display mode selected by the bootloader.

Definition at line 303 of file fb.cc.

Member Data Documentation

◆ m_bActive

bool Framebuffer::m_bActive
protected

Whether this framebuffer is active or not.

Definition at line 196 of file Framebuffer.h.

◆ m_bStoredMode

bool Framebuffer::m_bStoredMode
private

Definition at line 113 of file pedigree_fb.h.

◆ m_BytesPerLine

size_t Framebuffer::m_BytesPerLine
private

Definition at line 109 of file pedigree_fb.h.

◆ m_Fb

int Framebuffer::m_Fb
private

Definition at line 111 of file pedigree_fb.h.

◆ m_Format

cairo_format_t Framebuffer::m_Format
private

Definition at line 105 of file pedigree_fb.h.

◆ m_FramebufferBase

uintptr_t Framebuffer::m_FramebufferBase
protected

Definition at line 190 of file Framebuffer.h.

◆ m_FramebufferSize

size_t Framebuffer::m_FramebufferSize
private

Definition at line 103 of file pedigree_fb.h.

◆ m_Height

size_t Framebuffer::m_Height
private

Definition at line 108 of file pedigree_fb.h.

◆ m_MappingFlags

size_t Framebuffer::m_MappingFlags = 0
private

Definition at line 232 of file Framebuffer.h.

◆ m_nBytesPerLine

size_t Framebuffer::m_nBytesPerLine

Bytes per line in this framebuffer.

Definition at line 171 of file Framebuffer.h.

Referenced by swBlit(), swCopy(), swRect(), and swSetPixel().

◆ m_nBytesPerPixel

size_t Framebuffer::m_nBytesPerPixel

Bytes per pixel in this framebuffer.

Definition at line 166 of file Framebuffer.h.

Referenced by swBlit(), swCopy(), swCreateBuffer(), swRect(), and swSetPixel().

◆ m_nHeight

size_t Framebuffer::m_nHeight

Height of the framebuffer in pixels.

Definition at line 158 of file Framebuffer.h.

Referenced by swBlit(), swCopy(), swRect(), and swSetPixel().

◆ m_nWidth

size_t Framebuffer::m_nWidth

Width of the framebuffer in pixels.

Definition at line 154 of file Framebuffer.h.

Referenced by swBlit(), swCopy(), swRect(), and swSetPixel().

◆ m_Palette

uint32_t* Framebuffer::m_Palette
protected

Current graphics palette - an array of 256 32-bit RGBA entries.

Definition at line 193 of file Framebuffer.h.

Referenced by setPalette(), swRect(), and swSetPixel().

◆ m_pFramebuffer

void* Framebuffer::m_pFramebuffer
private

Definition at line 102 of file pedigree_fb.h.

◆ m_PixelFormat

Graphics::PixelFormat Framebuffer::m_PixelFormat

Framebuffer pixel format.

Definition at line 162 of file Framebuffer.h.

Referenced by redraw(), swCreateBuffer(), swRect(), and swSetPixel().

◆ m_pParent

Framebuffer* Framebuffer::m_pParent

Parent of this framebuffer.

Definition at line 176 of file Framebuffer.h.

Referenced by blit(), copy(), createBuffer(), getRawBuffer(), line(), rect(), redraw(), and setPixel().

◆ m_PreviousAcquireAction

struct sigaction Framebuffer::m_PreviousAcquireAction = {}
private

Definition at line 122 of file pedigree_fb.h.

◆ m_PreviousDisplayMode

int Framebuffer::m_PreviousDisplayMode = 0
private

Definition at line 119 of file pedigree_fb.h.

◆ m_PreviousReleaseAction

struct sigaction Framebuffer::m_PreviousReleaseAction = {}
private

Definition at line 121 of file pedigree_fb.h.

◆ m_PreviousTerminalMask

sigset_t Framebuffer::m_PreviousTerminalMask
private

Definition at line 123 of file pedigree_fb.h.

◆ m_PreviousTerminalMode

vt_mode Framebuffer::m_PreviousTerminalMode = {}
private

Definition at line 120 of file pedigree_fb.h.

◆ m_StoredMode

pedigree_fb_mode Framebuffer::m_StoredMode
private

Definition at line 114 of file pedigree_fb.h.

◆ m_Terminal

int Framebuffer::m_Terminal = -1
private

Definition at line 116 of file pedigree_fb.h.

◆ m_TerminalActive

volatile sig_atomic_t Framebuffer::m_TerminalActive = 1
private

Definition at line 117 of file pedigree_fb.h.

◆ m_TerminalRedraw

volatile sig_atomic_t Framebuffer::m_TerminalRedraw = 0
private

Definition at line 118 of file pedigree_fb.h.

◆ m_Width

size_t Framebuffer::m_Width
private

Definition at line 107 of file pedigree_fb.h.

◆ m_XPos

size_t Framebuffer::m_XPos

X position on our parent's framebuffer.

Class friendship isn't inheritable, so these have to be public for graphics drivers to use. They shouldn't be touched by anything that isn't a graphics driver.

Definition at line 146 of file Framebuffer.h.

Referenced by blit(), copy(), line(), rect(), redraw(), and setPixel().

◆ m_YPos

size_t Framebuffer::m_YPos

Y position on our parent's framebuffer.

Definition at line 150 of file Framebuffer.h.

Referenced by blit(), copy(), line(), rect(), redraw(), and setPixel().


The documentation for this class was generated from the following files: