fb_accel hd1/hd2: Add fb_accel_cs_hdx.cpp for common functions

- Add 'class CFbAccelCSHDx' to fb_accel.h
 - Some small code updates


Origin commit data
------------------
Branch: ni/coolstream
Commit: 3c1f2bfe05
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-03-28 (Tue, 28 Mar 2017)



------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2017-03-28 23:55:13 +02:00
parent 6823a03aa4
commit 8090c48f2f
6 changed files with 199 additions and 15 deletions

View File

@@ -78,17 +78,41 @@ class CFbAccelSTi
void setBlendLevel(int);
};
class CFbAccelCSHD1
class CFbAccelCSHDx
: public CFbAccel
{
private:
protected:
OpenThreads::Mutex mutex;
int fbCopy(uint32_t *mem_p, int width, int height, int dst_x, int dst_y, int src_x, int src_y, int mode);
int fbFill(int sx, int sy, int width, int height, fb_pixel_t color, int mode=0);
public:
CFbAccelCSHDx();
// ~CFbAccelCSHDx();
#if 0
/* TODO: Run this functions with hardware acceleration */
void SaveScreen(int x, int y, int dx, int dy, fb_pixel_t * const memp);
void RestoreScreen(int x, int y, int dx, int dy, fb_pixel_t * const memp);
void Clear();
#endif
};
class CFbAccelCSHD1
: public CFbAccelCSHDx
{
private:
fb_pixel_t lastcol;
fb_pixel_t *backbuffer;
int devmem_fd; /* to access the GXA register we use /dev/mem */
unsigned int smem_start; /* as aquired from the fbdev, the framebuffers physical start address */
volatile uint8_t *gxa_base; /* base address for the GXA's register access */
void setColor(fb_pixel_t col);
void run(void);
fb_pixel_t *backbuffer;
public:
CFbAccelCSHD1();
~CFbAccelCSHD1();
@@ -113,10 +137,12 @@ class CFbAccelCSHD1
};
class CFbAccelCSHD2
: public CFbAccel
: public CFbAccelCSHDx
{
private:
fb_pixel_t *backbuffer;
int sysRev;
bool IsApollo;
public:
CFbAccelCSHD2();