mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
add a CFrameBuffer implementation for SPARK
instead of clobbering up the code with lots of #ifdefs, create a separate file for SPARK
This commit is contained in:
@@ -18,7 +18,6 @@ noinst_LIBRARIES = libneutrino_driver.a libneutrino_driver_netfile.a
|
|||||||
libneutrino_driver_a_SOURCES = \
|
libneutrino_driver_a_SOURCES = \
|
||||||
abstime.c \
|
abstime.c \
|
||||||
fontrenderer.cpp \
|
fontrenderer.cpp \
|
||||||
framebuffer.cpp \
|
|
||||||
fb_window.cpp \
|
fb_window.cpp \
|
||||||
rcinput.cpp \
|
rcinput.cpp \
|
||||||
record.cpp \
|
record.cpp \
|
||||||
@@ -36,6 +35,13 @@ libneutrino_driver_a_SOURCES = \
|
|||||||
ringbuffer.c \
|
ringbuffer.c \
|
||||||
volume.cpp
|
volume.cpp
|
||||||
|
|
||||||
|
if BOXTYPE_SPARK
|
||||||
|
libneutrino_driver_a_SOURCES += \
|
||||||
|
framebuffer_spark.cpp
|
||||||
|
else
|
||||||
|
libneutrino_driver_a_SOURCES += \
|
||||||
|
framebuffer.cpp
|
||||||
|
endif
|
||||||
if BOXTYPE_COOL
|
if BOXTYPE_COOL
|
||||||
libneutrino_driver_a_SOURCES += \
|
libneutrino_driver_a_SOURCES += \
|
||||||
vfd.cpp
|
vfd.cpp
|
||||||
|
@@ -114,6 +114,10 @@ class CFrameBuffer
|
|||||||
std::map<std::string, rawIcon> icon_cache;
|
std::map<std::string, rawIcon> icon_cache;
|
||||||
int cache_size;
|
int cache_size;
|
||||||
void * int_convertRGB2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y, int transp, bool alpha);
|
void * int_convertRGB2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y, int transp, bool alpha);
|
||||||
|
#if HAVE_SPARK_HARDWARE
|
||||||
|
void blitRect(int x, int y, int width, int height, unsigned long color);
|
||||||
|
void blitIcon(int src_width, int src_height, int fb_x, int fb_y, int width, int height);
|
||||||
|
#endif
|
||||||
int m_transparent_default, m_transparent;
|
int m_transparent_default, m_transparent;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -215,7 +219,7 @@ class CFrameBuffer
|
|||||||
void add_gxa_sync_marker(void);
|
void add_gxa_sync_marker(void);
|
||||||
void waitForIdle(void);
|
void waitForIdle(void);
|
||||||
#else
|
#else
|
||||||
#if HAVE_TRIPLEDRAGON
|
#if HAVE_TRIPLEDRAGON || HAVE_SPARK_HARDWARE
|
||||||
void waitForIdle(void);
|
void waitForIdle(void);
|
||||||
#else
|
#else
|
||||||
inline void waitForIdle(void) {};
|
inline void waitForIdle(void) {};
|
||||||
@@ -226,6 +230,18 @@ class CFrameBuffer
|
|||||||
void displayRGB(unsigned char *rgbbuff, int x_size, int y_size, int x_pan, int y_pan, int x_offs, int y_offs, bool clearfb = true, int transp = 0xFF);
|
void displayRGB(unsigned char *rgbbuff, int x_size, int y_size, int x_pan, int y_pan, int x_offs, int y_offs, bool clearfb = true, int transp = 0xFF);
|
||||||
void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp = 0, uint32_t yp = 0, bool transp = false);
|
void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp = 0, uint32_t yp = 0, bool transp = false);
|
||||||
bool blitToPrimary(unsigned int * data, int dx, int dy, int sw, int sh);
|
bool blitToPrimary(unsigned int * data, int dx, int dy, int sw, int sh);
|
||||||
|
|
||||||
|
#if HAVE_SPARK_HARDWARE
|
||||||
|
int scaleX(const int x, bool clamp = true);
|
||||||
|
int scaleY(const int y, bool clamp = true);
|
||||||
|
void resize(int format);
|
||||||
|
void update(void);
|
||||||
|
#else
|
||||||
|
int scaleX(const int x, bool) { return x; };
|
||||||
|
int scaleY(const int y, bool) { return y; };
|
||||||
|
void resize(int) {};
|
||||||
|
void update(void) {};
|
||||||
|
#endif
|
||||||
void paintMuteIcon(bool paint, int ax, int ay, int dx, int dy, bool paintFrame=true);
|
void paintMuteIcon(bool paint, int ax, int ay, int dx, int dy, bool paintFrame=true);
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
1486
src/driver/framebuffer_spark.cpp
Normal file
1486
src/driver/framebuffer_spark.cpp
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user