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

@@ -264,13 +264,21 @@ void CFbAccelCSHD1::paintBoxRel(const int x, const int y, const int dx, const in
void CFbAccelCSHD1::fbCopyArea(uint32_t width, uint32_t height, uint32_t dst_x, uint32_t dst_y, uint32_t src_x, uint32_t src_y)
{
if ((width == 0) || (height == 0))
return;
uint32_t w_, h_;
w_ = (width > xRes) ? xRes : width;
h_ = (height > yRes) ? yRes : height;
//printf("\033[33m>>>>\033[0m [CFbAccelCSHD1::%s:%d] fb_copyarea w: %d, h: %d, dst_x: %d, dst_y: %d, src_x: %d, src_y: %d\n", __func__, __LINE__, w_, h_, dst_x, dst_y, src_x, src_y);
printf("\033[31m>>>>\033[0m [CFbAccelCSHD1::%s:%d] sw blit w: %d, h: %d, dst_x: %d, dst_y: %d, src_x: %d, src_y: %d\n", __func__, __LINE__, w_, h_, dst_x, dst_y, src_x, src_y);
CFrameBuffer::fbCopyArea(width, height, dst_x, dst_y, src_x, src_y);
int mode = CS_FBCOPY_FB2FB;
uint32_t src_y_ = src_y;
if (src_y >= yRes) {
mode = CS_FBCOPY_BB2FB;
src_y_ -= yRes;
}
fbCopy(NULL, w_, h_, dst_x, dst_y, src_x, src_y_, mode);
// printf("\033[31m>>>>\033[0m%s hw blit w: %d, h: %d, dst_x: %d, dst_y: %d, src_x: %d, src_y: %d\n", __func_ext__, w_, h_, dst_x, dst_y, src_x, src_y);
}
void CFbAccelCSHD1::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp)