mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
Merge branch 'master' of https://github.com/tuxbox-neutrino/gui-neutrino into ni/tuxbox
Conflicts:
src/driver/fb_accel.h
src/driver/fb_accel_cs_hd1.cpp
src/driver/fb_accel_cs_hd2.cpp
src/driver/fb_generic.cpp
src/driver/fb_generic.h
Origin commit data
------------------
Commit: 58b3f87cf5
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-02-20 (Mon, 20 Feb 2017)
This commit is contained in:
@@ -1598,6 +1598,62 @@ void * CFrameBuffer::convertRGBA2FB(unsigned char *rgbbuff, unsigned long x, uns
|
||||
return int_convertRGB2FB(rgbbuff, x, y, 0, true);
|
||||
}
|
||||
|
||||
void CFrameBuffer::fbCopyArea(uint32_t width, uint32_t height, uint32_t dst_x, uint32_t dst_y, uint32_t src_x, uint32_t src_y)
|
||||
{
|
||||
uint32_t w_, h_, i;
|
||||
fb_pixel_t *fromBuf = NULL, *toBuf = NULL;
|
||||
fb_pixel_t *dst_p, *src_p;
|
||||
fb_pixel_t * fbp = getFrameBufferPointer();
|
||||
fb_pixel_t * bbp = getBackBufferPointer();
|
||||
w_ = (width > xRes) ? xRes : width;
|
||||
h_ = (height > yRes) ? yRes : height;
|
||||
|
||||
if ((src_y < yRes) && (dst_y < yRes)) { /* copy within framebuffer */
|
||||
fromBuf = fbp;
|
||||
toBuf = fbp;
|
||||
}
|
||||
else if ((src_y >= yRes) && (dst_y >= yRes)) { /* copy within backbuffer */
|
||||
fromBuf = bbp;
|
||||
toBuf = bbp;
|
||||
dst_y -= yRes;
|
||||
src_y -= yRes;
|
||||
}
|
||||
else if (src_y >= yRes) { /* copy backbuffer => framebuffer */
|
||||
fromBuf = bbp;
|
||||
toBuf = fbp;
|
||||
src_y -= yRes;
|
||||
}
|
||||
else if (dst_y >= yRes) { /* copy framebuffer => backbuffer */
|
||||
fromBuf = fbp;
|
||||
toBuf = bbp;
|
||||
dst_y -= yRes;
|
||||
}
|
||||
if ((fromBuf == NULL) || (toBuf == NULL)) {
|
||||
//printf(">>>>> [%s:%d] buff = NULL\n", __func__, __LINE__);
|
||||
return;
|
||||
}
|
||||
if ((src_x == dst_x) && (src_y == dst_y) && (fromBuf == toBuf)) { /* self copy? */
|
||||
//printf(">>>>> [%s:%d] self copy?\n", __func__, __LINE__);
|
||||
return;
|
||||
}
|
||||
|
||||
dst_p = toBuf + dst_y*stride/sizeof(fb_pixel_t);
|
||||
src_p = fromBuf + src_y*stride/sizeof(fb_pixel_t);
|
||||
if ((w_ == xRes) && (stride == (xRes*sizeof(fb_pixel_t)))) { /* copy full width */
|
||||
//printf(">>>>> [%s:%d] copy full width - dst_p: %p, src_p: %p\n", __func__, __LINE__, dst_p, src_p);
|
||||
memcpy(dst_p, src_p, w_*h_*sizeof(fb_pixel_t));
|
||||
}
|
||||
else { /* copy all other */
|
||||
//printf(">>>>> [%s:%d] copy all other - dst_p: %p, src_p: %p\n", __func__, __LINE__, dst_p, src_p);
|
||||
uint32_t wMem = w_*sizeof(fb_pixel_t);
|
||||
for (i = 0; i < h_; i++) {
|
||||
memcpy(dst_p+dst_x, src_p+src_x, wMem);
|
||||
dst_p += stride/sizeof(fb_pixel_t);
|
||||
src_p += stride/sizeof(fb_pixel_t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
Reference in New Issue
Block a user