Merge branch 'pu/fb-setmode' of https://github.com/tuxbox-neutrino/gui-neutrino into ni/tuxbox

Conflicts:
	lib/libtuxtxt/tuxtxt.cpp
	lib/libtuxtxt/tuxtxt.h
	src/driver/fb_generic.h


Origin commit data
------------------
Commit: 3ff64707df
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-02-15 (Wed, 15 Feb 2017)
This commit is contained in:
vanhofen
2017-02-15 21:52:59 +01:00
18 changed files with 502 additions and 250 deletions

View File

@@ -267,6 +267,11 @@ max res 1920x1080
return 0; /* dont fail because of this */
}
fb_pixel_t * CFbAccelCSHD2::getBackBufferPointer() const
{
return backbuffer;
}
void CFbAccelCSHD2::setBlendMode(uint8_t mode)
{
if (ioctl(fd, FBIO_SETBLENDMODE, mode))
@@ -299,3 +304,20 @@ bool CFbAccelCSHD2::fullHdAvailable()
return true;
return false;
}
/* align for hw blit */
uint32_t CFbAccelCSHD2::getWidth4FB_HW_ACC(const uint32_t _x, const uint32_t _w, const bool max)
{
uint32_t ret = _w;
if ((_x + ret) >= xRes)
ret = xRes-_x-1;
if (ret%4 == 0)
return ret;
int add = (max) ? 3 : 0;
ret = ((ret + add) / 4) * 4;
if ((_x + ret) >= xRes)
ret -= 4;
return ret;
}