implement getWidth4FB_HW_ACC in fb_accel class

This helper to determine alignment for hardware blitting is now in
system/helpers.h, where it does not really belong. Put it into the
framebuffer class instead. Framebuffers that don't need it will just
get a dummy function, the cs_hd2 framebuffer gets the real thing.
Also add a bool function that indicates the need for alignment.


Origin commit data
------------------
Commit: b6909fb815
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-02-14 (Tue, 14 Feb 2017)
This commit is contained in:
Stefan Seyfried
2017-02-14 00:09:33 +01:00
committed by Michael Liebmann
parent 15dfa3449a
commit 78419473da
4 changed files with 27 additions and 2 deletions

View File

@@ -48,7 +48,6 @@
#include <gui/color.h>
#include <gui/pictureviewer.h>
#include <system/debug.h>
#include <system/helpers.h>
#include <global.h>
#include <video.h>
#include <cs_api.h>
@@ -514,7 +513,7 @@ fb_pixel_t* CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, co
#ifdef BOXMODEL_CS_HD2
if (_dx%4 != 0) {
w_align = GetWidth4FB_HW_ACC(x, _dx, true);
w_align = getWidth4FB_HW_ACC(x, _dx, true);
if (w_align < _dx)
_dx = w_align;
offs_align = w_align - _dx;
@@ -1770,3 +1769,8 @@ bool CFrameBuffer::_checkFbArea(int _x, int _y, int _dx, int _dy, bool prev)
void CFrameBuffer::mark(int , int , int , int )
{
}
uint32_t CFrameBuffer::getWidth4FB_HW_ACC(const uint32_t /*x*/, const uint32_t w, const bool /*max*/)
{
return w;
}