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
------------------
Branch: ni/coolstream
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!)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
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 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 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 waitForIdle(const char *func = NULL);
|
||||
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 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 setBlendMode(uint8_t);
|
||||
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);
|
||||
}
|
||||
|
||||
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;
|
||||
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__);
|
||||
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__);
|
||||
}
|
||||
|
||||
|
@@ -284,7 +284,7 @@ void CFbAccelCSNevis::paintBoxRel(const int x, const int y, const int dx, const
|
||||
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;
|
||||
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__);
|
||||
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__);
|
||||
}
|
||||
|
||||
|
@@ -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();
|
||||
}
|
||||
|
||||
|
@@ -253,7 +253,7 @@ nolfb:
|
||||
}
|
||||
|
||||
|
||||
CFrameBuffer::~CFrameBuffer()
|
||||
void CFrameBuffer::clearIconCache()
|
||||
{
|
||||
std::map<std::string, rawIcon>::iterator it;
|
||||
|
||||
@@ -262,6 +262,11 @@ CFrameBuffer::~CFrameBuffer()
|
||||
cs_free_uncached(it->second.data);
|
||||
}
|
||||
icon_cache.clear();
|
||||
}
|
||||
|
||||
CFrameBuffer::~CFrameBuffer()
|
||||
{
|
||||
clearIconCache(); //NI
|
||||
|
||||
if (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);
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
xc = (width > xRes) ? xRes : width;
|
||||
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;
|
||||
|
||||
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* 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);
|
||||
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);
|
||||
|
||||
virtual void mark(int x, int y, int dx, int dy);
|
||||
|
||||
//NI
|
||||
void clearIconCache();
|
||||
|
||||
enum
|
||||
{
|
||||
TM_EMPTY = 0,
|
||||
|
@@ -644,8 +644,13 @@ bool CPictureViewer::DisplayImage(const std::string & name, int posx, int posy,
|
||||
//NI
|
||||
bool CPictureViewer::DisplayImage_unscaled(const std::string & name, int posx, int posy, int width, int height, int transp)
|
||||
{
|
||||
int fb_w = width;
|
||||
int fb_h = height;
|
||||
if(width < 1 || height < 1){
|
||||
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();
|
||||
if (transp > CFrameBuffer::TM_EMPTY)
|
||||
@@ -658,7 +663,7 @@ bool CPictureViewer::DisplayImage_unscaled(const std::string & name, int posx, i
|
||||
frameBuffer->SetTransparentDefault();
|
||||
|
||||
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);
|
||||
return true;
|
||||
}
|
||||
|
@@ -76,7 +76,7 @@ class CPictureViewer
|
||||
void getSupportedImageFormats(std::vector<std::string>& erw);
|
||||
|
||||
//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:
|
||||
CFormathandler *fh_root;
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include <gui/components/cc.h>
|
||||
#include <zapit/zapit.h>
|
||||
|
||||
class CIMDB
|
||||
{
|
||||
|
Reference in New Issue
Block a user