20 #ifndef _MACHINE_FRAMEBUFFER_H 21 #define _MACHINE_FRAMEBUFFER_H 23 #include "pedigree/kernel/compiler.h" 24 #include "pedigree/kernel/graphics/Graphics.h" 25 #include "pedigree/kernel/processor/types.h" 38 size_t getWidth()
const;
39 size_t getHeight()
const;
41 Graphics::PixelFormat getFormat()
const;
43 bool getActive()
const;
45 void setActive(
bool b);
49 void setPalette(uint32_t *palette,
size_t nEntries);
51 uint32_t *getPalette()
const;
56 virtual void *getRawBuffer()
const;
73 const void *srcData, Graphics::PixelFormat srcFormat,
size_t width,
74 size_t height, uint32_t *pPalette = 0);
95 size_t x = ~0UL,
size_t y = ~0UL,
size_t w = ~0UL,
size_t h = ~0UL,
105 size_t desty,
size_t width,
size_t height,
bool bLowestCall =
true);
111 void *pBuffer,
size_t srcx,
size_t srcy,
size_t destx,
size_t desty,
112 size_t width,
size_t height,
113 Graphics::PixelFormat format = Graphics::Bits32_Argb,
114 bool bLowestCall =
true);
118 size_t x,
size_t y,
size_t width,
size_t height, uint32_t colour,
119 Graphics::PixelFormat format = Graphics::Bits32_Argb,
120 bool bLowestCall =
true);
124 size_t srcx,
size_t srcy,
size_t destx,
size_t desty,
size_t w,
125 size_t h,
bool bLowestCall =
true);
129 size_t x1,
size_t y1,
size_t x2,
size_t y2, uint32_t colour,
130 Graphics::PixelFormat format = Graphics::Bits32_Argb,
131 bool bLowestCall =
true);
135 size_t x,
size_t y, uint32_t colour,
136 Graphics::PixelFormat format = Graphics::Bits32_Argb,
137 bool bLowestCall =
true);
145 void setXPos(
size_t x);
149 void setYPos(
size_t y);
153 void setWidth(
size_t w);
157 void setHeight(
size_t h);
161 void setFormat(Graphics::PixelFormat pf);
165 void setBytesPerPixel(
size_t b);
166 uint32_t getBytesPerPixel()
const;
170 void setBytesPerLine(
size_t b);
171 uint32_t getBytesPerLine()
const;
178 virtual void setFramebuffer(uintptr_t p);
183 size_t x,
size_t y, uint32_t colour,
184 Graphics::PixelFormat format = Graphics::Bits32_Argb);
189 uintptr_t m_FramebufferBase;
203 size_t desty,
size_t width,
size_t height,
bool bLowestCall =
true);
207 size_t desty,
size_t width,
size_t height);
210 size_t x,
size_t y,
size_t width,
size_t height, uint32_t colour,
211 Graphics::PixelFormat format);
214 size_t srcx,
size_t srcy,
size_t destx,
size_t desty,
size_t w,
218 size_t x1,
size_t y1,
size_t x2,
size_t y2, uint32_t colour,
219 Graphics::PixelFormat format);
222 void *pBuffer,
size_t srcx,
size_t srcy,
size_t destx,
size_t desty,
223 size_t width,
size_t height,
224 Graphics::PixelFormat format = Graphics::Bits32_Argb,
225 bool bLowestCall =
true);
229 size_t desty,
size_t width,
size_t height,
bool bLowestCall =
true);
232 const void *srcData, Graphics::PixelFormat srcFormat,
size_t width,
233 size_t height, uint32_t *pPalette);
238 virtual void hwRedraw(
239 size_t x = ~0UL,
size_t y = ~0UL,
size_t w = ~0UL,
size_t h = ~0UL);
bool m_bActive
Whether this framebuffer is active or not.
size_t m_nWidth
Width of the framebuffer in pixels.
uint32_t * m_Palette
Current graphics palette - an array of 256 32-bit RGBA entries.
size_t m_YPos
Y position on our parent's framebuffer.
size_t m_nBytesPerPixel
Bytes per pixel in this framebuffer.
Framebuffer * m_pParent
Parent of this framebuffer.
Abstracts the system's framebuffer offering.
Graphics::PixelFormat m_PixelFormat
Framebuffer pixel format.
size_t m_nBytesPerLine
Bytes per line in this framebuffer.
size_t m_nHeight
Height of the framebuffer in pixels.