CCDraw: Add function for cleanup gradient background

Origin commit data
------------------
Branch: ni/coolstream
Commit: bf0f63467d
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2016-01-26 (Tue, 26 Jan 2016)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2016-01-26 06:16:35 +01:00
parent 0db98c17ec
commit be2781899a
2 changed files with 9 additions and 2 deletions

View File

@@ -71,6 +71,8 @@ CCDraw::CCDraw() : COSDFader(g_settings.theme.menu_Content_alpha)
cc_body_gradient_saturation = 0xC0;
cc_body_gradient_direction = cc_body_gradient_direction_old = CFrameBuffer::gradientVertical;
gradientBgCleanUp = false;
v_fbdata.clear();
}
@@ -591,6 +593,8 @@ void CCDraw::paintFbItems(bool do_save_bg)
}
// if found empty gradient buffer, create it, otherwise paint from cache
if (gradientBgCleanUp)
frameBuffer->paintBoxRel(fbdata.x, fbdata.y, fbdata.dx, fbdata.dy, 0, fbdata.r, fbdata.rtype);
if (fbdata.gradient_data->boxBuf == NULL){
dprintf(DEBUG_INFO, "\033[33m[CCDraw]\t[%s - %d], paint new gradient)...\033[0m\n", __func__, __LINE__);
fbdata.gradient_data->boxBuf = frameBuffer->paintBoxRel(fbdata.x, fbdata.y, fbdata.dx, fbdata.dy, 0, fbdata.gradient_data, fbdata.r, fbdata.rtype);
@@ -616,8 +620,6 @@ void CCDraw::paintFbItems(bool do_save_bg)
OnAfterPaintLayers();
}
void CCDraw::hide()
{
//restore saved screen background of item if available