From 1db2e302416456c3209ead4d5b4553d0f1d3e4ed Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Tue, 26 Jan 2016 06:16:32 +0100 Subject: [PATCH] CComponentsPicture: Align pictures at 4 byte boundary... ...for hw blit on apollo/kronos hardware Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/346b28556f579763a241255124d69f73a8111235 Author: Michael Liebmann Date: 2016-01-26 (Tue, 26 Jan 2016) --- src/gui/components/cc_item_picture.cpp | 5 +++++ src/gui/moviebrowser.cpp | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/components/cc_item_picture.cpp b/src/gui/components/cc_item_picture.cpp index c5ede3520..b6e0d1b82 100644 --- a/src/gui/components/cc_item_picture.cpp +++ b/src/gui/components/cc_item_picture.cpp @@ -33,6 +33,7 @@ #include "cc_item_picture.h" #include #include +#include extern CPictureViewer * g_PicViewer; @@ -196,6 +197,10 @@ void CComponentsPicture::initCCItem() if (keep_dx_aspect){ float h_ratio = float(height)*100/(float)dy; width = int(h_ratio*(float)dx/100); +#ifdef BOXMODEL_APOLLO + if (do_scale && (width > 10 || height > 10)) + width = GetWidth4FB_HW_ACC(x+fr_thickness, width-2*fr_thickness)+2*fr_thickness; +#endif } if (keep_dy_aspect){ float w_ratio = float(width)*100/(float)dx; diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index 29b4667bc..5b38a3af5 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -1347,10 +1347,6 @@ void CMovieBrowser::refreshMovieInfo(void) if (logo_ok) { flogo_w = (int)(((float)16 / (float)9) * (float)m_cBoxFrameInfo.iHeight); flogo_h = m_cBoxFrameInfo.iHeight; -#ifdef BOXMODEL_APOLLO - /* align for hw blit */ - flogo_w = ((flogo_w + 3) / 4) * 4; -#endif } static int logo_w = 0;