The Pedigree Project 0.1
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
VirtioGpu::GpuFramebuffer Class Referencefinal
+ Inheritance diagram for VirtioGpu::GpuFramebuffer:
+ Collaboration diagram for VirtioGpu::GpuFramebuffer:

Public Member Functions

 GpuFramebuffer (VirtioGpu *gpu)
 
physical_uintptr_t getPhysicalPage (size_t offset) const override
 
void closeCallbacks ()
 
void detach ()
 
- Public Member Functions inherited from Framebuffer
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 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 ()
 
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
 

Protected Member Functions

void hwRedraw (size_t x, size_t y, size_t width, size_t height) override
 Inherited by drivers that provide a hardware redraw function.
 
- Protected Member Functions inherited from Framebuffer
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)
 

Private Attributes

OperationBarrier m_Callbacks
 
VirtioGpu * m_Gpu
 

Additional Inherited Members

- Public Attributes inherited from Framebuffer
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 Attributes inherited from Framebuffer
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.
 

Detailed Description

Definition at line 37 of file VirtioGpu.h.

Constructor & Destructor Documentation

◆ GpuFramebuffer()

VirtioGpu::GpuFramebuffer::GpuFramebuffer ( VirtioGpu *  gpu)
explicit

Definition at line 104 of file VirtioGpu.cc.

Member Function Documentation

◆ closeCallbacks()

void VirtioGpu::GpuFramebuffer::closeCallbacks ( )

Definition at line 122 of file VirtioGpu.cc.

◆ detach()

void VirtioGpu::GpuFramebuffer::detach ( )

Definition at line 126 of file VirtioGpu.cc.

◆ getPhysicalPage()

physical_uintptr_t VirtioGpu::GpuFramebuffer::getPhysicalPage ( size_t  offset) const
overridevirtual

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 from Framebuffer.

Definition at line 107 of file VirtioGpu.cc.

References VirtualAddressSpace::getKernelAddressSpace(), VirtualAddressSpace::getMapping(), PhysicalMemoryManager::getPageSize(), and MemoryRegion::virtualAddress().

◆ hwRedraw()

void VirtioGpu::GpuFramebuffer::hwRedraw ( size_t  x,
size_t  y,
size_t  w,
size_t  h 
)
overrideprotectedvirtual

Inherited by drivers that provide a hardware redraw function.

Reimplemented from Framebuffer.

Definition at line 133 of file VirtioGpu.cc.

Member Data Documentation

◆ m_Callbacks

OperationBarrier VirtioGpu::GpuFramebuffer::m_Callbacks
private

Definition at line 48 of file VirtioGpu.h.

◆ m_Gpu

VirtioGpu* VirtioGpu::GpuFramebuffer::m_Gpu
private

Definition at line 49 of file VirtioGpu.h.


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