mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
fix build; try to port our framebuffer changes (need fixes!)
Origin commit data
------------------
Commit: fa727d1bff
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-02-08 (Wed, 08 Feb 2017)
Origin message was:
------------------
- fix build; try to port our framebuffer changes (need fixes!)
This commit is contained in:
@@ -98,7 +98,7 @@ class CFbAccelCSNevis
|
|||||||
void paintRect(const int x, const int y, const int dx, const int dy, const fb_pixel_t col);
|
void paintRect(const int x, const int y, const int dx, const int dy, const fb_pixel_t col);
|
||||||
void paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t col);
|
void paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t col);
|
||||||
void paintBoxRel(const int x, const int y, const int dx, const int dy, const fb_pixel_t col, int radius = 0, int type = CORNER_ALL);
|
void paintBoxRel(const int x, const int y, const int dx, const int dy, const fb_pixel_t col, int radius = 0, int type = CORNER_ALL);
|
||||||
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, uint32_t unscaled_w = 0, uint32_t unscaled_h = 0); //NI
|
||||||
void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff);
|
void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff);
|
||||||
void waitForIdle(const char *func = NULL);
|
void waitForIdle(const char *func = NULL);
|
||||||
fb_pixel_t * getBackBufferPointer() const;
|
fb_pixel_t * getBackBufferPointer() const;
|
||||||
@@ -121,7 +121,7 @@ class CFbAccelCSApollo
|
|||||||
|
|
||||||
void paintHLineRelInternal(int x, int dx, int y, const fb_pixel_t col);
|
void paintHLineRelInternal(int x, int dx, int y, const fb_pixel_t col);
|
||||||
void paintBoxRel(const int x, const int y, const int dx, const int dy, const fb_pixel_t col, int radius = 0, int type = CORNER_ALL);
|
void paintBoxRel(const int x, const int y, const int dx, const int dy, const fb_pixel_t col, int radius = 0, int type = CORNER_ALL);
|
||||||
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, uint32_t unscaled_w = 0, uint32_t unscaled_h = 0); //NI
|
||||||
void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff);
|
void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff);
|
||||||
void setBlendMode(uint8_t);
|
void setBlendMode(uint8_t);
|
||||||
void setBlendLevel(int);
|
void setBlendLevel(int);
|
||||||
|
@@ -152,7 +152,7 @@ void CFbAccelCSApollo::paintBoxRel(const int x, const int y, const int dx, const
|
|||||||
checkFbArea(x, y, dx, dy, false);
|
checkFbArea(x, y, dx, dy, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFbAccelCSApollo::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp)
|
void CFbAccelCSApollo::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp, uint32_t unscaled_w, uint32_t unscaled_h) //NI
|
||||||
{
|
{
|
||||||
int xc, yc;
|
int xc, yc;
|
||||||
xc = (width > xRes) ? xRes : width;
|
xc = (width > xRes) ? xRes : width;
|
||||||
@@ -171,7 +171,7 @@ void CFbAccelCSApollo::blit2FB(void *fbbuff, uint32_t width, uint32_t height, ui
|
|||||||
//printf(">>>>>[%s:%d] Use HW accel\n", __func__, __LINE__);
|
//printf(">>>>>[%s:%d] Use HW accel\n", __func__, __LINE__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CFrameBuffer::blit2FB(fbbuff, width, height, xoff, yoff, xp, yp, transp);
|
CFrameBuffer::blit2FB(fbbuff, width, height, xoff, yoff, xp, yp, transp, unscaled_w, unscaled_h); //NI
|
||||||
//printf(">>>>>[%s:%d] NO HW accel\n", __func__, __LINE__);
|
//printf(">>>>>[%s:%d] NO HW accel\n", __func__, __LINE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -284,7 +284,7 @@ void CFbAccelCSNevis::paintBoxRel(const int x, const int y, const int dx, const
|
|||||||
checkFbArea(x, y, dx, dy, false);
|
checkFbArea(x, y, dx, dy, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFbAccelCSNevis::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp)
|
void CFbAccelCSNevis::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp, uint32_t unscaled_w, uint32_t unscaled_h) //NI
|
||||||
{
|
{
|
||||||
int xc, yc;
|
int xc, yc;
|
||||||
xc = (width > xRes) ? xRes : width;
|
xc = (width > xRes) ? xRes : width;
|
||||||
@@ -308,7 +308,7 @@ void CFbAccelCSNevis::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uin
|
|||||||
//printf(">>>>>[%s:%d] Use HW accel\n", __func__, __LINE__);
|
//printf(">>>>>[%s:%d] Use HW accel\n", __func__, __LINE__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CFrameBuffer::blit2FB(fbbuff, width, height, xoff, yoff, xp, yp, transp);
|
CFrameBuffer::blit2FB(fbbuff, width, height, xoff, yoff, xp, yp, transp, unscaled_w, unscaled_h); //NI
|
||||||
//printf(">>>>>[%s:%d] NO HW accel\n", __func__, __LINE__);
|
//printf(">>>>>[%s:%d] NO HW accel\n", __func__, __LINE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -75,9 +75,9 @@ CFbAccelGLFB::~CFbAccelGLFB()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFbAccelGLFB::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp)
|
void CFbAccelGLFB::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp, uint32_t unscaled_w, uint32_t unscaled_h) //NI
|
||||||
{
|
{
|
||||||
CFrameBuffer::blit2FB(fbbuff, width, height, xoff, yoff, xp, yp, transp);
|
CFrameBuffer::blit2FB(fbbuff, width, height, xoff, yoff, xp, yp, transp, unscaled_w, unscaled_h); //NI
|
||||||
blit();
|
blit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -253,7 +253,7 @@ nolfb:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CFrameBuffer::~CFrameBuffer()
|
void CFrameBuffer::clearIconCache()
|
||||||
{
|
{
|
||||||
std::map<std::string, rawIcon>::iterator it;
|
std::map<std::string, rawIcon>::iterator it;
|
||||||
|
|
||||||
@@ -262,6 +262,11 @@ CFrameBuffer::~CFrameBuffer()
|
|||||||
cs_free_uncached(it->second.data);
|
cs_free_uncached(it->second.data);
|
||||||
}
|
}
|
||||||
icon_cache.clear();
|
icon_cache.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
CFrameBuffer::~CFrameBuffer()
|
||||||
|
{
|
||||||
|
clearIconCache(); //NI
|
||||||
|
|
||||||
if (background) {
|
if (background) {
|
||||||
delete[] background;
|
delete[] background;
|
||||||
@@ -1677,13 +1682,22 @@ void * CFrameBuffer::convertRGBA2FB(unsigned char *rgbbuff, unsigned long x, uns
|
|||||||
return int_convertRGB2FB(rgbbuff, x, y, 0, true);
|
return int_convertRGB2FB(rgbbuff, x, y, 0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrameBuffer::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool /*transp*/)
|
void CFrameBuffer::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool /*transp*/, uint32_t unscaled_w, uint32_t unscaled_h) //NI
|
||||||
{
|
{
|
||||||
int xc, yc;
|
int xc, yc;
|
||||||
|
|
||||||
xc = (width > xRes) ? xRes : width;
|
xc = (width > xRes) ? xRes : width;
|
||||||
yc = (height > yRes) ? yRes : height;
|
yc = (height > yRes) ? yRes : height;
|
||||||
|
|
||||||
|
//FIXME
|
||||||
|
#if 0
|
||||||
|
//NI
|
||||||
|
if(unscaled_w != 0 && (int)unscaled_w < xc)
|
||||||
|
xc = unscaled_w;
|
||||||
|
if(unscaled_h != 0 && (int)unscaled_h < yc)
|
||||||
|
yc = unscaled_h;
|
||||||
|
#endif
|
||||||
|
|
||||||
fb_pixel_t* data = (fb_pixel_t *) fbbuff;
|
fb_pixel_t* data = (fb_pixel_t *) fbbuff;
|
||||||
|
|
||||||
uint8_t * d = ((uint8_t *)getFrameBufferPointer()) + xoff * sizeof(fb_pixel_t) + stride * yoff;
|
uint8_t * d = ((uint8_t *)getFrameBufferPointer()) + xoff * sizeof(fb_pixel_t) + stride * yoff;
|
||||||
|
@@ -266,11 +266,14 @@ class CFrameBuffer : public sigc::trackable
|
|||||||
void* convertRGB2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y, int transp = 0xFF);
|
void* convertRGB2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y, int transp = 0xFF);
|
||||||
void* convertRGBA2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y);
|
void* convertRGBA2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y);
|
||||||
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);
|
||||||
virtual 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);
|
virtual 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, uint32_t unscaled_w = 0, uint32_t unscaled_h = 0); //NI
|
||||||
void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff);
|
void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff);
|
||||||
|
|
||||||
virtual void mark(int x, int y, int dx, int dy);
|
virtual void mark(int x, int y, int dx, int dy);
|
||||||
|
|
||||||
|
//NI
|
||||||
|
void clearIconCache();
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
TM_EMPTY = 0,
|
TM_EMPTY = 0,
|
||||||
|
@@ -644,8 +644,13 @@ bool CPictureViewer::DisplayImage(const std::string & name, int posx, int posy,
|
|||||||
//NI
|
//NI
|
||||||
bool CPictureViewer::DisplayImage_unscaled(const std::string & name, int posx, int posy, int width, int height, int transp)
|
bool CPictureViewer::DisplayImage_unscaled(const std::string & name, int posx, int posy, int width, int height, int transp)
|
||||||
{
|
{
|
||||||
int fb_w = width;
|
if(width < 1 || height < 1){
|
||||||
int fb_h = height;
|
dprintf(DEBUG_NORMAL, "[CPictureViewer] [%s - %d] Error: width %i height %i \n", __func__, __LINE__, width, height);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int unscaled_w = width;
|
||||||
|
int unscaled_h = height;
|
||||||
|
|
||||||
CFrameBuffer* frameBuffer = CFrameBuffer::getInstance();
|
CFrameBuffer* frameBuffer = CFrameBuffer::getInstance();
|
||||||
if (transp > CFrameBuffer::TM_EMPTY)
|
if (transp > CFrameBuffer::TM_EMPTY)
|
||||||
@@ -658,7 +663,7 @@ bool CPictureViewer::DisplayImage_unscaled(const std::string & name, int posx, i
|
|||||||
frameBuffer->SetTransparentDefault();
|
frameBuffer->SetTransparentDefault();
|
||||||
|
|
||||||
if(data) {
|
if(data) {
|
||||||
frameBuffer->blit2FB_unscaled(data, width, height, posx, posy, fb_w, fb_h);
|
frameBuffer->blit2FB(data, width, height, posx, posy, 0, 0, transp, unscaled_w, unscaled_h);
|
||||||
cs_free_uncached(data);
|
cs_free_uncached(data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -76,7 +76,7 @@ class CPictureViewer
|
|||||||
void getSupportedImageFormats(std::vector<std::string>& erw);
|
void getSupportedImageFormats(std::vector<std::string>& erw);
|
||||||
|
|
||||||
//NI
|
//NI
|
||||||
bool DisplayImage_unscaled(const std::string & name, int posx, int posy, int width, int height, int transp=CFrameBuffer::TM_EMPTY);
|
bool DisplayImage_unscaled(const std::string & name, int posx, int posy, int width, int height, int transp=0 /*CFrameBuffer::TM_EMPTY*/);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CFormathandler *fh_root;
|
CFormathandler *fh_root;
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <gui/components/cc.h>
|
#include <gui/components/cc.h>
|
||||||
|
#include <zapit/zapit.h>
|
||||||
|
|
||||||
class CIMDB
|
class CIMDB
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user